1. Thomas Dietrich
  2. PowerBuilder
  3. Tuesday, 19 December 2023 14:57 PM UTC

Hi

How can I embed a "non custom font" to the native PDF export?

I am aware that I can add "NativePDF_IncludeCustomFont=1" to the pb.ini but it doesn't work since "calibri" is not a custom font...

Any ideas?

Thanks,

Thomas

kitty he @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 20 December 2023 05:42 AM UTC
  2. PowerBuilder
  3. # 1

Hi Thomas,

 

The method of setting NativePDF_IncludeCustomFont=1 in ini is no longer used in 2019 R3 (obsolete from 2019 R2). You can use the solution provided by John and set it in Application > PDF Export, which should solve your problem.

 

Regards,

Kitty

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 19 December 2023 16:21 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Thomas -

I could be mistaken (would not be the first time, won't be the last), but I believe when PB creates the PDF, it determines if the user's currently selected printer contains the font(s) used in the DataWindow and only imbeds a font in the PDF when it is missing from the printer. The Calibri TrueType font is likely available for the person that creates the PDF, so it does not get imbedded.

Calibri has been included in the Windows operating system since Windows Vista and can be used on versions as far back as Windows XP, so my question is why does someone (the customer) not have Calibri available in their web browser, because they should have it available it they are running a non-antique version of Windows?

You neglected to state what version of PB you are using (always a good idea when posting a question here). For your information, at some point around PB 2019 R3 (I don't recall exactly), a couple of Native PDF properties were added to the Application object, on the Additional Properties dialog window (shown below):

You may want to see if your version supports the property I've highlighted and test.

Best regards, John

Comment
  1. Thomas Dietrich
  2. Tuesday, 19 December 2023 16:30 PM UTC
John,



Thanks again for your answer. As mentioned, the PDF is being uploaded to a website and if downloaded/viewd on a mobile device, the font is off.



I am using PB 2019 R3 Build 2779.



I tried to enable "NativePDF_IncludeCustomFont=1" but it seems like PB ignores "Calibri" because it is not a custom font.



Thanks,

Thomas
  1. Helpful
  1. David Peace
  2. Thursday, 21 December 2023 10:54 AM UTC
Hi Thomas

If you set the Application option described in John's post this will include the Calibri font. I know becuase w eave had this same problem with IOS mobile devices.



"... a couple of Native PDF properties were added to the Application object, on the Additional Properties dialog window (shown below):"



This will fix your problem.



David



  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.