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.
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.
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
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.
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.
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
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
Format to configure: PDF
Method: NativePDF!
PDF Conformance: None (0)
Use These Two Settings in Print Specifications: unchecked