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.

Once a postscript driver is installed, you (or the server administrator) can add a Sybase DataWindow PS profile from the Install Printer Software page of the wizard in one of these ways:
  • Click Have Disk and browse to the Adist5.inf file (installed with PowerBuilder) in the Shared\PowerBuilder\drivers 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.

See Installing GPL Ghostscript.

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 bin\client 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 pbvm125.dll and the other PowerBuilder runtime files are included in a server computer directory called ServerPB, the Apache processor must be copied to ServerPB\fop-0.20.4 and the JRE to ServerPB\jre, 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.

These JAR files must be in the server computer’s 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 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.

Note: If the Web Forms server computer is a DBCS platform, you also need to include a file that supports DBCS characters in the Windows font directory, for example, C:\WINDOWS\fonts. For more information about configuring fonts, see the Apache Web site at http://xml.apache.org/fop/fonts.html.