Navigation:  CopiaFacts Features > Converting Documents to Fax Format >

Using Ghostscript

Previous pageReturn to chapter overviewNext page

If you have a copy of Ghostscript, you may prefer to use this for converting PDF documents. You may obtain AFPL Ghostscript (free) from http://www.cs.wisc.edu/~ghost. Using Ghostscript may give better results on some documents. Since the TIF file is produced directly, instead of via a print driver, some processing complexity is eliminated.

To use Ghostscript, add a $convert_options keyword of GSPDF to the user profile referenced from the FS file, or in the FS file itself. The option keywords GS300 or GS400 can be used instead of GSPDF to specify 300x300 or 400x400 resolution PDFs respectively.

Install a current release of Ghostscript using the provided installer (currently GS851W32.EXE). If you use the standard Ghostscript install, FFEXTERN will pick up the details from the registry and no further configuration is needed. Check the 'install fonts' box: if you need to use other than the standard Ghostscript fonts, you can configure these in Ghostscript as described in the documentation: Copia cannot provide you with support for this task.

The use of Ghostscript for converting PDF files currently has the following restrictions:

The TIF image height defaults to the height of the first page in the PDF, so all pages in the PDF are expected to be the same height. Ghostscript will usually automatically arrange for the rotation of landscape documents to fit fax format provided that the dimensions are compatible with the specified size.
It is strongly recommended that any non-standard fonts are embedded in the PDF. If you do not do this, they may be substituted with inappropriate Ghostscript fonts.
All conversion defaults to T.6 encoded faxable TIFF in fine resolution.
Color or grey-scale originals are not dithered.
Acrobat accepts some PDF files which do not conform to Adobe standards, whereas Ghostscript does not. Some Macintosh files fall into this category (more information in the Ghostscript user manual).

The default conversion uses five Ghostscript command parameters, other than the specifications of the output and input filenames.  You may override any of these five parameters for special purposes, and also add additional parameters if you wish.  System variables GSPDF1 through GSPDF5 define overrides for each of the default parameters, and GSPDF6 through GSPDF9 define additional parameters.  If you add parameters 6 through 9, you must use consecutive numbers.  Defining for example parameter 8 on its own, without 6 and 7, will cause the conversion to fail.  Each variable should contain only a single parameter definition.  Note that parameter values are case sensitive.

The default values of the first five parameters are as follows:

GSPDF1-dBATCH
GSPDF2-dNOPAUSE
GSPDF3-g1728x2292 (example: actual values calculated from source document)
GSPDF4-r204x196 (example: different values apply for GS300 and GS400 convert options)
GSPDF5-sDEVICE=tiffg4

Among parameters you may wish to add are -dPDFFitPage and -dNORANGEPAGESIZE.  Together these will adjust the page scaling and select the page orientation to accommodate oversized originals.  When both these parameters are given, the page length will be set to approximately 11 inches and Ghostscript will adjust the scaling to fit this size. These two parameters must be set individually, not using the Ghostscript "@filename" syntax to specify parameters in a separate file.

For example if your fax boards are older models of Brooktrout Trufax, which cannot handle T.6 encoding, you would need to add a command in the CFG file, or USR/UJP or FS files for FFEXTERN-initiated conversions as follows:

$var_def  GSPDF5  "-sDEVICE=tiffg3"

Consult the Ghostscript user documentation at http://www.cs.wisc.edu/~ghost/doc/AFPL/8.50/Use.htm for more information on the Ghostscript command-line parameters. Ghostscript conversion errors detected by CVSINGLE are listed with other Document Conversion Errors.

Conversions done from CVSINGLE must define any required GSPDFx variables in the CopiaFacts configuration file.  Conversions done from FFEXTERN can use the configuration file, the FS file, or the USR/UJP file referenced from the FS file on its $fax_user command.

Ghostscript conversions can also be done using CVSINGLE by specifying the -G command-line option. If you wish to convert single documents with non-standard options, you can use the Ghostscript program (GSWIN32.EXE) directly. The following parameters are suggested (note that parameters are case-sensitive):

-dBATCH

-dNOPAUSE

-dSAFER

-dTextAlphaBits=4

-g1728x2292 (for A4)

-g1728x2156 (for US letter)

-r204x196

-sDEVICE=tiffg4

-sOutputFile=outfilename

infilename

If you have any problems converting particular PDF files, it is a good idea to try reading them with the Ghostscript program or with Ghostview (separately downloadable) and viewing any error messages that are displayed.  For more information on using Ghostscript, please refer to the extensive documentation which is installed with the program. You can also batch-convert Postscript files to TIFF/F with Ghostscript.

Ghostscript does not rotate landscape documents to create a faxable TIF image. From CVSINGLE release 7.264, PDF documents in landscape Letter and A4 sizes (with width:height  11:8.5 inches or 297:210 mm respectively) are detected automatically and rotated after conversion to TIF. This allows landscape-format documents in these sizes to be converted without special handling (as already happens for Adobe conversions using the Copia Fax Converter print driver).  This only applies to these specific document sizes.  Note that if you are using GSPDFx variable overrides, they must be set differently for landscape-format conversions: the -g option must be -g2292x1728 or -g2156x1728 and the -r option must be -r196x204 or -r200x200. It is therefore necessary to know in advance the orientation of the PDF document when overriding the default values.

There is a different, commercial, program called GoScript (www.lasergo.com) which also handles conversion from Postscript to TIFF/F.

 


Topic url: http://www.copia.com/support/refmanual/index.html?ghostscript.htm