Hi Hung,
- Please check and see if you are on the latest PB, i.e. PB 2017 R3 build 1858. In this latest release a bug that setting Arabic as the regional language caused failure in generating PDF with NativePDF was fixed. So if you are not on this latest release, please upgrade it to this latest release and try again and see if it works.
You may download and install this latest release from our Downloads portal at https://www.appeon.com/user/center/index?menu=download (requires login) or you may manually go to the Downloads portal from Login (to the Appeon Website) > User Center (under your login user icon) > Downloads.
- Please make sure that you have write permission over the %temp% folder on the current PC.
- Please copy the attached log.ini to the %temp% folder (default directory:C:\Users\appeon\AppData\Local\Temp)and then try to generate PDF file with NativePDF. Log files will be generated in this folder and please provide those generated log files for further analysis.
- Please let us know your Operation System and the system language: (e.g. 32-bit Window 7, English).
What’s the difference between those PCs that work and those that don’t?
- Kindly please report your PB issue via our support ticketing system to ensure it is being properly received by our tech support and tracked at: https://www.appeon.com/standardsupport/
Please attach the log files generated (mentioned above) when opening the ticket. Thanks in advance.
Regards,
Mark Lee
--------------------------------------------------------------------------------------------------------------------------------------
I ran in similar problem with creating PDF files in PB2017 R2. I changed my app from using Ghostscript to NativePDF. The exe works find on my development PC and it works on some of the users PCs but not others. I am still figuring out what the problem is. I've also read the PowerBuilder’s PDF Evolution blogs (link listed above from Armeen Mazda.) I agree using NativePDF new features had many advantages PB documentation is not very clear. In addition, the blog indicated "improving the built-in PDF feature in following revisions (e.g. R2 and R3)." I read the release not but did not find any mention about PDF in R3, Can someone please confirm new PDF feature in R3? I am currently using R2, should I upgrade to R3 to get rid of the problem.
Here is what I did
- Data Export tab of my datawindow
- Format to configure set to PDF
- Method NativePDF!
- PDF Conformance None
- Save the datawindow
If you open the data window again it will show the default "Format to configure XML"
// Script on the print button
// Set datawindow to export using PDF Native
dw_rpt_to_print.Object.DataWindow.Export.PDF.Method = NativePDF!
dw_rpt_to_print.Object.DataWindow.Export.PDF.NativePDF.UsePrintSpec = 'No'
// Portrait
dw_rpt_to_print.Object.DataWindow.Export.PDF.NativePDF.CustomOrientation = 2
dw_rpt_to_print.InsertRow(1)
dw_rpt_to_print.Object.commnent_txt[1] = "This is a test"
ll_rc = dw_rpt_to_print.SaveAs( "test.pdf", PDF!, TRUE )
IF ll_rc = -1 THEN
ls_msg = "ERROR -- Failed to create PDF file"
ls_msg += "~n~nPlease Contact System Support For Assisstance!"
gnv_app.uf_message( ls_msg, -1 )
RETURN -1
END IF
The PDF files printed on some user PCs but not others.