• If PDF files are generated through a PowerBuilder application, how do you print them?
  • How to print a collection of PDF files from PowerBuilder?


Microsoft Windows 7 x64


If your application has generated one or several PDFs you can launch a batch file that cycles through all the PDF files in a directory and prints them using Adobe Acrobat.

The batch file PrintPDFs.bat has the following contents:
FOR %%c IN (%1) DO CALL PrintPDF.bat %%c

this file, in turn, launches PrintPDF.bat that will actually prints an individual PDF and has  the following contents:
START AcroRd32.exe /h /p %1
TASKKILL /IM AcroRd32.exe

Running the sample:

  1. Unzip into a local directory
  2. Open pdfprint.pbw in PB IDE
  3. Set your default printer
  4. Run the application
  5. Click on "Print PDFs" command button