PDF and XSL-FO export
PowerBuilder can save the DataWindow’s data and presentation
as a Portable Document Format (PDF) file using two techniques. By
default, PowerBuilder saves as PDF using a distiller. PowerBuilder
can also save to PDF or XSL Formatting Objects (XSL-FO) format using
the Apache XML Formatting Objects processor.
Using the GNU Ghostscript distiller
In order for users to use the SaveAs method
to save data as PDF with the distiller, they must first download
and install GNU AFPL Ghostscript on their computers as described
in the procedure that follows.
The use of GNU AFPL Ghostscript is subject to the terms and
conditions of the GNU General Public License (GPL). Users should
be asked to read the GPL before installing GNU Ghostscript on their
computers. A copy of the GPL is available on the GNU Project Web server
.
To install GNU Ghostscript:
-
Into a temporary directory on your computer,
download the self-extracting executable file for the version of
Ghostscript you want from one of the sites listed on the Ghostscript Web site
. -
Run the executable file to
install Ghostscript on your system.The default installation directory is C:gs.
You can select a different directory and/or choose to install
shortcuts to the Ghostscript console and readme file.
Location of files
When you save a DataWindow object as PDF using the distill
method, PowerBuilder searches in the following locations for an
installation of GNU Ghostscript:
- The Windows
registry - The relative path of the pbdwe100.dll file
(typically SybaseSharedPowerBuilder) - The system PATH environment variable
If GNU Ghostscript is installed using the Ghostscript executable
file, the path is added to the Windows registry.
If the Ghostscript files are in the relative path of the pbdwe100.dll file,
they must be installed in this directory structure:
1 |
<i>dirname</i>pbdwe100.dll<br /><i>dirname</i>gsgs<i>N.NN</i><br /><i>dirname</i>gsfonts |
where dirname is the directory that contains
the runtime DLLs and N.NN represents the release
version number for Ghostscript.
You might not need to distribute all the fonts provided in
the distribution. For information about fonts, see Fonts and font facilities supplied with Ghostscript
.
You must also deploy the default PostScript printer driver
and related files that are installed in SybaseSharedPowerBuilderdrivers.
These files can be copied to or installed on users’ computers.
They must be located in this directory structure:
1 |
<i>dirname</i>pbdwe100.dll<br /><i>dirname</i>drivers |
PostScript printer profile
Each user’s computer must have a PostScript printer
profile called Sybase DataWindow PS. This profile is added to your
development computer automatically when you save a DataWindow’s
rows to a PDF file in the DataWindow painter.
Users can add the profile manually using the Windows Add Printer
wizard. In the wizard, click the Have Disk button and browse to
the Adist5.inf file installed in the SharedPowerBuilderdrivers directory,
or to another PostScript driver file.
Using the Apache FO processor
If your application uses the Apache processor to save as PDF
or XSL-FO, you must deploy the fop-0.20.4 directory
and the Java Runtime Environment (JRE) with your application.
They must be deployed in the same directory as the PowerBuilder
runtime files. For example, if you deploy your application and pbvm100.dll and
the other PowerBuilder runtime files in a directory called MyApplication,
the Apache processor and the JRE must be deployed in MyApplication/fop-0.20.4 and MyApplication/jre.
However, you do not need to place a copy of the JRE in this location
if the full JDK is installed on the target computer and is in the classpath.
The following JAR files must be in the user’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
For more information about the JRE, see “Java support”.
On Windows DBCS platforms, you also need to deploy a file
that supports DBCS characters to the Windows font directory on the
target computer, for example, C:WINDOWSfonts.
For more information about configuring fonts, see the Apache Web site
.