1. Christopher Gonzalez
  2. PowerBuilder
  3. Monday, 12 April 2021 12:57 PM UTC

I have a .NET Webservice that when called, generates a DataWindow from DataWindow Syntax passed in as a parameter. The service then creates a PDF file from the generated DataWindow using SaveAS. It then takes that PDF and saves it to a row in a database as a BLOB file. I am hosting this web service locally for test purposes.

This webservice works as expected with standard DataWindows, however we have DataWindows that utilize custom fonts to create barcodes that are not generating properly. The custom fonts are .TFF files that are installed in the Fonts directory of Windows.

My issue is that the webservice does not appear to be able to access the custom fonts. I know they are installed properly, because I have Powerbuilder apps that can create the same DataWindows on my local machine. Is there a spot in the web service directory that I should include the .TFF files? 

Christopher Gonzalez Accepted Answer Pending Moderation
  1. Tuesday, 13 April 2021 12:41 PM UTC
  2. PowerBuilder
  3. # 1
0
Votes
Undo

1) PB Webservice

2) PB2017 R3 Build 1858

3) Distill!

4) The fonts have been installed, however I am unsure about the default printer on IIS. How would I check that?

 

Thank you,

Chris

 

Comment
Hi Chris ... did you enable the NativePDF to save the fonts in the PDF via the PB.ini, as follows:



[Data Window]

; 1 = Use Native, 0 = GhostScript or XLSFO

NativePDF_Valid=1

; 1 = Embed fonts in PDF, 0 = Do not embed fonts in PDF

NativePDF_IncludeCustomFont=1



Regards ... Chris
  1. Chris Pollach @Appeon
  2. Tuesday, 20 April 2021 14:40 PM UTC
Added these to the PB.ini and no such luck
  1. Christopher Gonzalez
  2. Thursday, 22 April 2021 17:57 PM UTC
Ahhh .. yes, this option is not applicable to a Web Service - only an native PB App EXE.

However if we approach the WS side of life differently, you *can* accomplish this by having the WS call a "Native" PB App EXE to perform the PDF generation. The "native" EXE in turn can then use the NativePDF option and then also embed the fonts (or what ever other special PDF features that, that option provides)

FYI: http://chrispollach.blogspot.com/2017/10/pdf.html

Food for thought. HTH
  1. Chris Pollach @Appeon
  2. Thursday, 22 April 2021 20:46 PM UTC
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 12 April 2021 19:34 PM UTC
  2. PowerBuilder
  3. # 2
0
Votes
Undo

Hi Chris;

  Can you tell us ...

1) Is this a PB Web Service or SNAP based C# Web Service?

2) What version & build of PB are you using?

3) Does the DWO use NativePDF! or the Distill! (aka GhostScript) mechanism to generate the PDF files?

4) Does the WS machine have the fonts installed and available to the default printer on IIS?

Regards ... Chris

Comment
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.