How to solve the loss of math symbols in PDF exported using NativePDF

Symptom

Exporting a PDF file using NativePDF, you may notice the loss of math symbols in "PDE 𝑢_𝑡 = Δ₁^𝑁 𝑢".


Environment

PowerBuilder 2017 R3 Build 1951 and later 

Cause

NativePDF uses the third-party plugin PDFlib to convert the content to EMF format before exporting the PDF file. When the AutoSize Height property of a DataWindow column is enabled, NativePDF handle all of the contents in this column as a whole and redraws them using the current set font. 

When the column font is set to Arial or Arial Unicode MS font, NativePDF cannot export them correctly as the specified font doesn't support the math symbols "PDE 𝑢_𝑡 = Δ₁^𝑁 𝑢". 

Solution

Solution #1:

Change the font from Arial or Arial Unicode MS font to one that supports math symbols "PDE 𝑢_𝑡 = Δ₁^𝑁 𝑢", such as Segoe UI.

Solution #2:

Change the AutoSize Height property of the specific DataWindow column to No.

Sample code:

dw_1.Object.customcolumn.Height.AutoSize = "No"