Symptom
-
If PDF files are generated through a PowerBuilder application, how do you print them?
-
How to print a collection of PDF files from PowerBuilder?
Environment
Microsoft Windows 7 x64
Solution
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:
-
Unzip PrintPDFs.zip into a local directory
-
Open pdfprint.pbw in PB IDE
-
Set your default printer
-
Run the application
-
Click on "Print PDFs" command button