1. John Vanleeuwe
  2. PowerBuilder
  3. Wednesday, 18 July 2018 07:10 AM UTC

Hi guys,

 

we just rolled out our software with the new PB2017 for a first customer.

we used to have the PDF save as with the Sybase Datawindow PS solution, which worked great but was a PITA for the support / new server / find the right ghostscript and so on.

 

Since we are using the native save as , this customer receives an error upon opening a PDF generated by our software.

It says : Cannot find or create the font 'xxxxxx' Some characters may not display or print correctly.

 

Do we need to embed the font ? If yes , how?

 

TIA

John

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 July 2018 13:42 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi John;

   Have you tried this?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 18 July 2018 14:12 PM UTC
Hi John;



I agree 100% and have voiced the same to Engineering. The other side of the coin is that InfoMaker does not have any scripting capabilities - so by not exposing these as properties, we are limiting the IM user's PDF capabilities when building "Report" objects (aka DW's).



Regards ... Chris
  1. Helpful
  1. mike S
  2. Thursday, 19 July 2018 04:27 AM UTC
it would work the same in infomaker if the option is displayed as a visual setting in the datawindow IDE. it is no different than any of the other print options. all of the pdf options should really be in the ide.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 19 July 2018 13:58 PM UTC
That's the issue Mike .. not all PDF options are exposed as properties of the DWO.
  1. Helpful
There are no comments made yet.
Thomas Dietrich Accepted Answer Pending Moderation
  1. Tuesday, 19 December 2023 14:35 PM UTC
  2. PowerBuilder
  3. # 1

Chris,

I want to embedd the "Calibri" font to a PDF export (customer complains that it does not show correctly when used in a browser).

 

Adding the script to pb.ini does not work, probably because Calibri is not a custom font? Is there a workaround for this?

 

Thanks,

Thomas

Comment
  1. Thomas Dietrich
  2. Tuesday, 19 December 2023 15:50 PM UTC
John, thanks for your reply.



The PDF is uploaded to a website and when downloaded/opened on a mobile device, the font is off...
  1. Helpful
  1. John Fauss
  2. Tuesday, 19 December 2023 16:28 PM UTC
OK - That's an important point and good to know! My recent response to your other Q&A question also asks about this, so please forgive the doubling up. I think that response will help to shed some light on why Calibri is not being imbedded.
  1. Helpful 1
  1. mike S
  2. Tuesday, 19 December 2023 16:29 PM UTC
help indicates a few things:



1. "use the application object to specify whether to package custom fonts."

that's pretty lame to have it at only the application level. this should be settable at the datawindow and at runtime.



2. "custom fonts"

what is a custom font? That might be nice as a generic catch all if you use a lot of different fonts, but what is 'custom' on one OS version is not custom on another. let alone what is not custom on window but is custom on any other OS (mobile, apple, etc). it should provide the ability to specify the fonts to include.

That probably requires that we can easily get a list of fonts in use on a datawindow: ."DataWindow.Font.List" I think now you would have to check every object.



You should enter this as a bug/enhancement request.



(Also, in the future you should create a new topic rather than ask your question in an existing 5 year old topic.)

  1. Helpful 1
There are no comments made yet.
John Vanleeuwe Accepted Answer Pending Moderation
  1. Wednesday, 18 July 2018 15:00 PM UTC
  2. PowerBuilder
  3. # 2

Hi Chris,

thanks. Should i have both ini's adapted ?

 

Or is the one for the IDE to have the IDE working and the other one to have the compiled exe at the customer working ?

Or should they both have this change ?

Not sure if i am making any sense here... :(

 

TIA

John

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 18 July 2018 15:19 PM UTC
Hi John;

Yes, you will need both INI's enabled with these changes to make sure that your PB App testing is the same behaviour in the PB IDE as your App's EXE testing for PDF rendering.



HTH

Regards ... Chris
  1. Helpful
  1. John Vanleeuwe
  2. Thursday, 19 July 2018 04:50 AM UTC
Hi Chris,

We have the font installed on our devpc's , so our PDF save as works just fine. The problem is only on the compiled exe where the users who receive mail with PDFs attached can't see the barcode font.



I thought maybe we needed the pb.ini also on the IDE and something was happening with it at compilation time.



I will try at my customer and get back with the results here.



Thanks again !
  1. Helpful
  1. John Vanleeuwe
  2. Thursday, 19 July 2018 10:49 AM UTC
Hi guys,



adding the section to the pb.ini does indeed work.



i saw the size of the same PDF went from 10KB ( with ghostscript.dll / Sybase Datawindow PS) to 95 KB ( with nativepdf). Is this something known and will this be improved ? I fail to understand why the first solution doesn't have the need for an embedded font and the second one does ?









TIA

John
  1. Helpful
There are no comments made yet.
John Vanleeuwe Accepted Answer Pending Moderation
  1. Wednesday, 18 July 2018 09:09 AM UTC
  2. PowerBuilder
  3. # 3

Thanks Armeen.

Can you confirm whether this was a bug or not ? And or whether this should be fixed in R2 please ?

I have tried R2 , deployed to customer but same result.

 

TIA

John

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 18 July 2018 21:01 PM UTC
I'm not aware of any bugs related to fonts. Please try the suggestions Chris gave, and if your issue still persists then please report it as a bug with a reproducible test case so we can diagnose: https://www.appeon.com/standardsupport/newbug
  1. Helpful
There are no comments made yet.
John Vanleeuwe Accepted Answer Pending Moderation
  1. Wednesday, 18 July 2018 07:43 AM UTC
  2. PowerBuilder
  3. # 4

Hi guys,

did a some more searching and saw that there are quite a few things fixed concerning nativepdf! save function in the 2017R2.

 

i will try this and post the results here later.

 

 

Grts

John

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 18 July 2018 08:33 AM UTC
PB 2017 R3 is even better. It adds support for:

1. Restrictions can now be imposed on a PDF such as: password, not printable, non-modifiable, no annotations allowed, non-copiable, etc. just to name a few

2. Using the new SaveNativePDFtoBlob command, you can now build a PDF directly in memory

3. It no longer writes a temp PDF to disk so even in higher security configs it still works

This webinar is a good primer for PB 2017 R3: https://www.appeon.com/company/events/hands-look-powerbuilder-2017-r3.html
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.