Requirements for Saving Files in PDF or XSL Format
The default PDF printing feature uses the Sybase DataWindow PS printer to print output to a PostScript (PS) file, and then convert it to a PDF file format.
You must grant print permissions to the ASPNET, IIS_WPG, or IIS_IUSRS user group for the Sybase DataWindow PS printer.
Alternatively, you could use the Apache Formatting Objects (FO) processor to save a DataWindow and its data in the PDF or XSL-FO format.
PostScript printing method
The Sybase DataWindow PS printer profile is added automatically to a computer�s printer list when you save a DataWindow to a PDF file from a PowerBuilder application. This does not occur automatically with a Web Forms application; however, Web Forms users can use the Sybase DataWindow PS printer that you create on the server computer from a standard client-server application at design time or runtime
You can also add the Sybase DataWindow PS profile manually to the server computer using the Windows Add Printer wizard. If a PostScript driver has not been previously installed on the IIS server computer, the Add Printer wizard might ask you to insert the Windows installation CD.
- Click Have Disk and browse to the Adist5.inf file (installed with PowerBuilder) in the SharedPowerBuilderdrivers directory, or to another PostScript driver file.
- Select a printer with PS in its name (such as �Apple Color LW 12/660 PS�) from the list of printers of the wizard.
You must then rename the printer to “Sybase DataWindow PS” on the Name Your Printer page of the Add Printer wizard or in the Properties dialog box for the added printer.
To enable PDF printing from a Web Forms application using the postscript processing method, you must also install Ghostscript on the IIS server computer.
Apache FO processing method
If a Web Forms application uses the Apache processor to save a DataWindow and its data in PDF or XSL-FO format, you must include the fop-0.20.4 directory and the Java Runtime Environment (JRE) on the server computer. The binclient folder of the JRE must be in the server computer�s system path.
The processor directory and the JRE must be in the same path as the PowerBuilder runtime files. For example, if pbvm120.dll and the other PowerBuilder runtime files are included in a server computer directory called ServerPB, the Apache processor must be copied to ServerPBfop-0.20.4 and the JRE to ServerPBjre, respectively. However, you do not need to place a copy of the JRE in this location if the full JDK is installed on the server computer and is in its classpath.
- fop-0.20.4uildfop.jar
- fop-0.20.4libatik.jar
- fop-0.20.4libxalan-2.3.1.jar
- fop-0.20.4libxercesImpl-2.1.0.jar
- fop-0.20.4libxml-apis.jar
- fop-0.20.4libavalon-framework-cvs-20020315.jar
You might also need to restart the IIS server before you can use this method to print to a PDF file from a Web Forms application.
- Installing GPL Ghostscript
To enable Web Forms users to save their data in PDF format using the postscript processing method, you must download and install Ghostscript on the IIS server computer. - Where PDF and XSL-FO Output is Saved
If a full path is not provided in the SaveAs command, the PDF and XSL-FO files that users generate from Web Forms DataWindow objects are saved by default in the virtual root path for IIS Web sites.