1. Dale Burts
  2. PowerBuilder
  3. Tuesday, 16 July 2024 14:51 PM UTC

Is ghostscript install still required when using PDFDocument object in PB2022?

John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 16 July 2024 19:49 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Dale - The PDFDocument object is not a replacement for the GhostScript creation of PDF output. However, the Native PDF feature that was added to PB 2017 is a replacement for GhostScript. 

The PDFDocument object is designed to (from PB Help, with added emphasis): It imports data from a DataWindow object, a DataWindowChild object or a DataStore object, or an existing PDF document to a new PDF document and saves the document.

The Native PDF feature saves the contents of a DataWindow/DataStore as a PDF document.

I hope this helps.

Best regards, John

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 17 July 2024 05:23 AM UTC
Thanks John, very helpful! And just adding to what John said, PDFDodcument object can manipulate any PDF files no matter it was generated by the NativePDF engine in PowerBuilder or generated outside of PowerBuilder.
  1. Helpful
There are no comments made yet.
Dale Burts Accepted Answer Pending Moderation
  1. Tuesday, 16 July 2024 15:58 PM UTC
  2. PowerBuilder
  3. # 2

So to clarify, we no longer need to install GHOSTSCRIPT on our PCs, when we are using the new PDFDocument object [using PB2022R3] to generate PDFs?

 

As currently, we have to install GHOSTSCRIPT on each PC image when generating PDF documents using PB2019R3, otherwise we get an error:

 

 

 li_rtn = dw_print.saveas( ls_copydoc, PDF!, True )

if isnull(li_rtn) or li_rtn = -1 then 
    messagebox('Problem Saving',"There's an issue saving the document.~r~nTry saving again.")
   return
end if

 

Comment
  1. René Ullrich
  2. Wednesday, 17 July 2024 05:33 AM UTC
You don't need Ghostscript for PDFDocument feature.

But you still need Ghostscript for SaveAs to PDF if you use the Distill! method. You have to change this to NativePDF!. You can do this in each datawindow (in "Data Export" properties) or easier in "Additional Properties" of the application object for the whole application.

This also works in PB2019R3!
  1. Helpful 1
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 16 July 2024 15:12 PM UTC
  2. PowerBuilder
  3. # 3

Hi.

No. PDFDocument has nothing to do with ghostscript.

Andreas.

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.