You can use two techniques to save the data in a DataStore to PDF: Using the GNU Ghostscript distiller, and using the ability to process data using XSL Formatting Objects (XSL-FO). You can save the DataWindow object’s data to XSL-FO or PDF, and print using Java printing.
To use the GNU Ghostscript distiller, you must make sure that Ghostscript files and the default PostScript printer driver and related files are installed on the server in the same directory as the PowerBuilder runtime files. The Ghostscript method is not supported on UNIX.
To use XSL-FO, the Apache XSL Formatting Objects processor (FOP) must be installed on the server in the same directory as the PowerBuilder runtime files, and the following JAR files must be in the classpath:
fop-0.20.4\build\fop.jar
fop-0.20.4\lib\batik.jar
fop-0.20.4\lib\xalan-2.3.1.jar
fop-0.20.4\lib\xercesImpl-2.1.0.jar
fop-0.20.4\lib\xml-apis.jar
fop-0.20.4\lib\avalon-framework-cvs-20020315.jar
You can add these files to the CLASSPATH environment variable or to User_setenv.bat or Serverstart.bat.
When you use XSL-FO with EAServer to produce a PDF file, detailed informational and warning messages are written to the Jaguar log. To suppress all these messages, set the PB_FOP_SUPPRESSLOG environment variable to 1.
For more information, see the chapter on enhancing DataWindow objects in the PowerBuilder User’s Guide.