1. ilya Milin
  2. PowerBuilder
  3. Tuesday, 29 June 2021 20:17 PM UTC

PB-2017 32bit.

I have a complex reporting process that creates a Postscript file that is converting to PDF using Distill method.

Is there a way to convert this Postscript file to PDF using the NativePDF approach? If Yes, please provide brief description .

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 29 June 2021 23:09 PM UTC
  2. PowerBuilder
  3. # 1

Hi Ilya;

  Suggestion:  Why not use the free & built-in MS-Windows O/S PDF printer?

For example:

  • DC/DS.Modify ("DataWindow.Print.PrinterName='Microsoft Print to PDF'")
  • DC/DS.Modify("DataWindow.Print.FileName='<Path><Name>.pdf'")
  • DC/DS.Print()

  Note: You could also use the PrintDataWindow() command as well in a loop to create one PDF from many DWO's. Food for thought.  HTH

Regards ... Chris

 

Comment
  1. ilya Milin
  2. Wednesday, 30 June 2021 19:41 PM UTC
Hi Chris,

Thanks a lot for promptly reply with a very good suggestion and the example. I have created a test PDF from a DW - working fine. But, there is always some 'but'...

a) How to create in that loop specifically ONE PDF fie, accumulating the data from a number of DWs and number of DSs.



b) I saw Dan's recommendation to use QPDF Third Party software to append a number of PDF files - not sure how to include it to my PB application and how to call it from PB script.



c) How to re-use already created Postscript file(trying not to touch much the business logic) to PDF without the Distill



I would appreciate your advice very much.

Thank you,

Ilya
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 30 June 2021 19:57 PM UTC
a) use the PrintDataWindow() command - one for each DWO - in a loop.

b) I would ask Dan if ha has some example code.

c) I used to just copy the postscript or printer files directly to a PDF printer. For example:

COPY mypsfile /b PRN:
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 29 June 2021 22:10 PM UTC
  2. PowerBuilder
  3. # 2

I think that Dan Cooperstock might have just answered this with his post titled "Solution to appending to PDFs". It might have what you need.

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.