1. Roland Smith
  2. PowerBuilder
  3. Thursday, 18 March 2021 18:13 PM UTC

I know how to print multiple DataWindows in one print job:

Long ll_Job

ll_Job = PrintOpen("Transcript Report")
If ll_Job > 0 Then
    PrintDataWindow(ll_Job, dw_1)
    PrintDataWindow(ll_Job, dw_2)
    PrintClose(ll_Job)
Else
    MessageBox("Print", "PrintOpen Failed!", StopSign!)
End If

I also want to be able to save multiple DataWindows to one PDF file.

I was able to work out the following:

Print the DataWindows to postscript files.

Run the Ghostscript program with the right parameters to create a PDF file from the multiple .ps files.

 

I am wondering if anyone has had success doing this with NativePDF or some other method.

Mark Goldsmith Accepted Answer Pending Moderation
  1. Thursday, 18 March 2021 19:16 PM UTC
  2. PowerBuilder
  3. # 1

Hi Roland...I think this was requested back in 2018 or 2019 as a PDF enhancement, maybe by Chris, but still hasn't been provided and so I'm still using PDFCreator with code that looks something like this:

dw_age_1.SaveAs("D:\cps\age.pdf", PDF!, True)
dw_specialties.SaveAs("D:\cps\specialties.pdf", PDF!, True)

Run('D:\Program Files\PDFCreator\PDFCreator.exe /merge "D:\cps\age.pdf" "D:\cps\specialties.pdf" /OutputFile="D:\cps\Age_and_Specialties.pdf"')

Regards,

Mark

Comment
  1. Mark Goldsmith
  2. Wednesday, 20 July 2022 16:20 PM UTC
Awesome, glad to hear that worked for you Tracy! While I haven't needed that functionality yet it's good to know it actually does work, lol.
  1. Helpful
  1. Tracy Lamb
  2. Wednesday, 20 July 2022 17:05 PM UTC
My Beta tester did that, then for giggles and grins he set the Interactive mode to Automatic. Now, PDFCreator doesn't even display. Merged files are created and saved "automagically"! So, I'm updating my product Release Notes to reflect these changes. Looking forward to PB2022... hopefully customers won't have to install a 3rd party product that I don't support.
  1. Helpful 1
  1. Mark Goldsmith
  2. Wednesday, 20 July 2022 17:36 PM UTC
That's great!! Agreed...looking forward to PB 2022 for a whole host of reasons.
  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.