1. Aliaksei Hlinski
  2. PowerBuilder
  3. Friday, 28 December 2018 14:57 PM UTC

Hi,

NativePDF: Is it possible to save two datawindows in one pdf file? It was easy to do with pdf printer, how to do it with NativePDF ?

Thanks.

JOHN THOMAS Accepted Answer Pending Moderation
  1. Friday, 4 December 2020 17:52 PM UTC
  2. PowerBuilder
  3. # 1

Guys  - I didn't see this thread. Can you tell me exactly how to set up Ghostscript with PB so that PB will see it as a printer/driver to use?  We are using older (2006) G.S. dll in another old box but it does not show up as a printer/driver, they are calling the .dll specifically in a .Net/C# script. Thanks.

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Saturday, 29 December 2018 16:26 PM UTC
  2. PowerBuilder
  3. # 2

Chris is right.

We do this all the time. Each invoice page is a single DW, but the invoice we generate contains multiple pages all inside on PDF.

Works like a charm with Ghostscript.


Olan

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 28 December 2018 17:23 PM UTC
  2. PowerBuilder
  3. # 3

Hi Aliaksei;

     Its pretty easy to do using GHostScript. You just need to perform the multiple DWO in one PDF generation by using one print job ... for example:

long     ll_job
ll_job = PrintOpen( )
PrintDataWindow(ll_job , dw_one)
PrintDataWindow(ll_job , dw_two)
...
PrintDataWindow(ll_job , dw_nnn)
PrintClose(ll_job)

 

      The second alternative is to place the 2+ DWO's in one Nested or Composite parent DWO and just print that. This approach will work with either the GhostScript or NativePDF feature.

     The third alternative is to create one PDF per DWO and then "stitch" the single PDF's into one.

FYI:  https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

 

HTH

Regards ... Chris

 

Comment
  1. Joseph John
  2. Wednesday, 2 January 2019 15:57 PM UTC
Hi Chris,

for the first Solution using ghostscript ( Printdatawindow() ) , do you know where do we specify the default PDF output directory and the filename ?



Regards,

Joseph
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 2 January 2019 16:06 PM UTC
Hi Joseph;

The FileOpen ( ) command is in charge of the File Name and location path. ;-)

Regards ... Chris
  1. Helpful
  1. Joseph John
  2. Thursday, 3 January 2019 10:13 AM UTC
Hi Chris,

is it something like this?



long ll_job

//ll_job = PrintOpen( )

ll_job = FileOpen('C:\test.pdf' )

PrintDataWindow(ll_job , dw_one)

PrintDataWindow(ll_job , dw_two)

...

PrintDataWindow(ll_job , dw_nnn)

//PrintClose(ll_job)

FileClose(ll_job)





  1. Helpful
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.