1. Roland Smith
  2. PowerBuilder
  3. Wednesday, 5 July 2017 16:39 PM UTC

A comment on a question from a few days ago leads me to this question.

Is the new native PDF generation the default or do you have to set the DataWindow.Export.PDF.Method property? I saved a few PDF files but I am unsure which method it used.

 

Appeon Support Team Accepted Answer Pending Moderation
  1. Friday, 7 July 2017 09:10 AM UTC
  2. PowerBuilder
  3. # 1

Hi Roland,

If the DataWindow.Export.PDF.Method is Distill! then it requires to install the GhostScript for Dw Saveas PDF. If selecting the DataWindow.Export.PDF.Method as the NativePDF! then it will use the new PB2017 NativePDF solution and won’t require to install the GhostScript and any other software on the client. For more details please refer to the PB help documentation (Application Techniques> Deployment Techniques> Deploying Applications and Components> PDF and XSL-FO export> Using the PDFlib generator).

As a suggestion, after you upgrade to the Appeon PowerBuilder 2017, you can manually modify the PDF Method into NativePDF! in DW to perform testing. If you are satisfied with the testing result, then you can use the interface as below to implement the NativePDF solution for all of the DW Saveas PDF thus you don’t need to make many code changes manually. 

Add the following node in the [Data Window] section in pb.ini:
NativePDF_Valid=1 // it is 0 by default, and it indicates that it uses the one set in the Datawindow property panel. But if it is set to 1 by the customer dynamically then it uses the NativePDF.
Add the following in the [Data Window] section in pb.ini:
NativePDF_IncludeCustomFont=1 // it is set to 0 by default and it means the fonts are not packed. But if it is set to 1 by the customer dynamically then it means the fonts are packed.

Furthermore, you will still need to install the GhostScript if you create PDF's from the Database Painter. The DB Painter still relies on GhostScript when you perform a Save Rows As from the Result Set pane. Also, the internal PDF feature is not available with .Net Assemblies or Web Services.

 

Thanks,

Appeon Support Team

Comment
  1. Nancy Wu
  2. Friday, 19 January 2018 03:28 AM UTC
I'm using PB2017 and I'm able to save as PDF. However, the output PDF file generates multiple duplicated copies (100 pages) instead of one (10 pages).



Could anyone tell me how to get rid of the unnecessary duplicated copies in order for user to mail out asap?



Thanks for your kindly support!



Nancy



 

  1. Helpful
  1. Pete Yankovich
  2. Monday, 11 June 2018 20:38 PM UTC
I've migrated a PB 12.6 app to PB 2017 R2.  The app creates two PDF's from datawindows.  The fonts are different in the 2017 PDF compared to 12.6 versions.  These are the PDF settings for the DW's (I didn't see how to paste in an image).  Is there a way to correct the fonts?



Format to configure: PDF



Method: NativePDF!



PDF Conformance: None (0)



Use These Two Settings in Print Specifications: unchecked



 

  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 5 July 2017 19:25 PM UTC
  2. PowerBuilder
  3. # 2

Thanks Mike. I didn't get an answer from Chris' response. He mentioned changing to Distill, I was wondering what the default was for an unchanged DataWindow.

This explains why my test results of a PDF issue didn't change when I tried in PB 2017 verses an earlier version.

I have a free tool on my website called PBDotWeb. It allows you to run PB Classic code within IIS or Apache directly from a PBL or PBD, no special compile or .Net conversion needed. SaveAs PDF doesn't work in that environment so I wanted to try the native method to see if that worked. If the native method works, it will be able to save DataWindow reports to PDF and then stream the file back to the browser.

Comment
  1. · Dainis
  2. Thursday, 20 July 2017 08:03 AM UTC
...If the native method works, it will be able to save DataWindow reports to PDF and then stream the file back to the browser.



It is not able to save DataWindow reports to PDF. File is blank.

  1. Helpful
There are no comments made yet.
Mike S Accepted Answer Pending Moderation
  1. Wednesday, 5 July 2017 18:48 PM UTC
  2. PowerBuilder
  3. # 3

as chris said, it defaults to distill (ghostscript).  

I don't install/use ghostscript and in the IDE the save-as PDF doesn't work for me unless you change the dw pdf option to native.

So in your application you would either have to change every datawindow to use native or set it via modify at runtime.

I guess they wanted to provide backward compatibility for those who want to keep using ghostcript?  I don't agree with that decision; if they are keeping GS as an option that is one thing, but why would you make the non-native option the default?

Its not really an issue for me since i had to wrap the saveas functionality anyway to use a 3rd party pdf generator so the runtime modify to use native is no big deal.  Except for doing a saveas pdf in the IDE.

 

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 5 July 2017 17:20 PM UTC
  2. PowerBuilder
  3. # 4

Hi Roland;

  A great question ... and, I had to ask Engineering about this too in my beta testing!

1) Seems like the DWO always displays the the fact that it is working in XML mode in the DW Painter - no matter what you set it to in the Export Data tab page previously. It seems that this was the standard behaviour in PB 12.6 as well (weird or what) and thus carries on in PB 2017 IDE, as follows:

For an XLSFO based DWO Source, the DWO source would have the following setting::

   export.pdf(method=1 distill.custompostscript="0" xslfop.print="0" nativepdf.customsize=0 nativepdf.customorientation=0 )

 

2) However, if the DWO was changed for the PDF setting & saved in the PBL as a "Distil!" option (aka GhostScript), the DWO source would reflect as follows:

export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" nativepdf.customsize=0 nativepdf.customorientation=0 )

 

3) Now, when you set the DWO to render PDF's using the new Internal! option, ,the DWO source will change as follows:

export.pdf(method=2 distill.custompostscript="0" xslfop.print="0" nativepdf.customsize=0 nativepdf.customorientation=0 )

 

HTH

Regards ... Chris

 

Comment
  1. Ashutosh Varshney
  2. Wednesday, 5 July 2017 18:52 PM UTC
Chris,



I am not clear - what is the default? Say I create a new DW and not set export params. Now if I call SaveAS PDF, will it default to Internal or Distill?



And to add to Roland's question what would migrated DWs be defaulted to? If I migrate my app from PB 12.5, would I have to set export params for all my DWs to Internal or will it be assumed as default?

  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.