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_USRS 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 the following ways:

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.

For more information about installing Ghostscript, 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 pbvm110.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.

The following JAR files must be in the server computer’s classpath:

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.

NoteDBCS platforms 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.