Bug 7462

Can't generate pdf file 16 November, 2021

Mario Francisco Celleri
04 November, 2021
Product: PowerBuilder Category: Runtime
Version: 2019 R3 Build: 2703
Classification: Issue Publishing: Public
Priority: P3
Status: Analyzing Reason:
Communication Status: Waiting for Customer
Chris Pollach @Appeon 16 November, 2021
#11
Hi Mario;

  Were you able to resolve your DS to PDF issue?

Regards ... Chris
Chris Pollach @Appeon 09 November, 2021
#10
Hi Mario;

  FYI: DataStore test case attached. This uses the "PB Demo DB V2019R3" demo database that comes with the PB2019R3 installation. When you run my test case, the PDF is created from the DataStore.

  Note that I am using PB2019R3 build 2728.  HTH

Regards ... Chris
Chris Pollach @Appeon 09 November, 2021
#9
Test Case (By Chris)
Mario Francisco Celleri 08 November, 2021
#8
(In reply to Chris Pollach @Appeon from comment #7)
Both DW Control & Data Store support the SaveAs() command for native PDF
generation.
There is possible to show us how to save datastore to pdf? We do same to dw, but the pdf file don't be created. Regards
Chris Pollach @Appeon 08 November, 2021
#7
Both DW Control & Data Store support the SaveAs() command for native PDF generation.
Mario Francisco Celleri 08 November, 2021
#6
Something wrong Chris;

Maybe we do something bad. Please can you confirm us if is posible to save as pdf from a data store? Or only is posible from dw?
Chris Pollach @Appeon 08 November, 2021
#5
Hi Mario;

  Excellent news .. I was just going to recommend trying build 2728.

  I will now close this ticket.

Regards ... Chris
Mario Francisco Celleri 05 November, 2021
#4
Thanks Chris;

We already tried what you suggest; however the problem remained.
We found that the problem is with the Runtime 19.2.0.2703 pbpdf library
Having updated a PB 2019 R3 LTS in one machine, and deployed the app with the Runtime 19.2.0.2728 library; the problem was solved.

If you can check the PB 2013 R3 with the Runtime 19.2.0.2728 library; maybe reproduce/generate our problem.
Chris Pollach @Appeon 05 November, 2021
#3
Hi Mario;

  If the  "pbpdf" DLL is there in the App deployment folder, then that is all you need to use the nativePDF feature. What could be happening though is that you are trying to write the PDF file to a folder that your PB App does not have write privileges to. If that is the case, then the "li_ret" variable would reflect the PDF write failure. As a simple test for folder write privileges, try running the PB App EXE "As Admin". If that works, then that is your issue. Then try changing the code to write to another folder when in normal user mode.

Regards ... Chris
Mario Francisco Celleri 04 November, 2021
#2
Hi Chris;

Yes, we copy the runtime dll's, to a folder; and our app's started in this folder.
Chris Pollach @Appeon 04 November, 2021
#1
Hi Mario;

 As per the PB Help file under the "Runtime" => "List of Runtime files" section ...  did you deploy the "pbpdf" DLL?

Regards ... Chris
Mario Francisco Celleri 04 November, 2021
When run in IDE the pdf files will create successfully; but when conpile our apps; and run them into clients (Win10 and Win7); the files have'nt be created.
We check all the suggestions, tips and tricks we encounter; but not solve the issue

Our apps have been migrated from PB9.0 to PB 2019 R3.

I send a part of the code we use:
int li_ret
               ds_impre.Object.DataWindow.Export.PDF.Method = NativePDF!
                ds_impre.Object.DataWindow.Export.PDF.NativePDF.Restrictions = 'noprint!,nocopy!'

     li_ret = ds_impre.SaveAs(ls_path+nombre+'.pdf',PDF!, true)
OS:
All
Platform:
32-bit
Database Type:
IBM Informix
Database Version:
11.70