Requirements for Saving Files in PDF or XSL Format – PB Docs 120


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

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

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

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:WINDOWSfonts. For more information about configuring fonts, see the Apache Web site at http://xml.apache.org/fop/fonts.html.

  • 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.

Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x