Saving data in PDF format

In order for users of Windows Forms applications to use the SaveAs method to save data as PDF, they must first download and install Ghostscript on their computers as described in the procedure that follows. If you are setting up a Web server for a Web forms application, follow the same procedure to install Ghostscript on the server. Ghostscript is not required on the client for Web applications. For Web Forms applications, you should also read “Saving as PDF”.

The use of GPL 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 GPL Ghostscript on their computers. A copy of the GPL is available on the GNU Project Web server.

The use of AFPL Ghostscript is subject to the terms and conditions of the Aladdin Free Public License (AFPL). Commercial distribution of AFPL Ghostscript generally requires a written commercial license. For more information, see the Ghostscript Web site.

StepsTo install Ghostscript:

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

  2. Run the executable file to install Ghostscript on your system.

    The default installation directory is C:\Program Files\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, the DataWindow server searches in the following locations for an installation of Ghostscript:

If 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 pbdwn110.dll file, they must be installed in this directory structure:

dirname\pbdwn110.dll
dirname\gs\gsN.NN
dirname\gs\fonts

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.

PostScript printer drivers

If your users have installed a PostScript printer on their computers, the PostScript driver files required to create PDF files are already installed. If they have never installed a PostScript printer, they can use the Printers and Faxes option in the Windows control panel to install a generic PostScript printer. If the Microsoft Pscript5.dll has never been installed, they may be prompted to insert the Windows install CD.

You must also deploy the related files that are installed in Sybase\DataWindow.NET 2.5\drivers. These files can be copied to or installed on the target computers. They must be located in this directory structure:

dirname\pbdwn110.dll
dirname\drivers

PostScript printer profile

Each user’s computer (or the Web server for Web applications) 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 DataWindow .NET 2.5\drivers directory, or to another PostScript driver file.