|
eqpcl utilityRevision: 0.6 (2011-10-17)Thank you for your interest in the Eloquence eqpcl utility. This is an beta test release of the eqpcl utility that is developed for the upcoming B.08.20 release. By making test releases available publicly we hope to encourage wider testing and additional feedback. Please note: This release is available under the terms of the Eloquence Beta Test Agreement which is specified in the file AGREEMENT. Downloading and installing the software indicates your agreement to the Beta Test terms and conditions. This test release may not meet the release criteria for quality or performance and is intended for test use only.
IntroductionThe eqpcl utility allows converting PCL documents to PDF or PostScript. It implements a commonly used subset of PCL functionality and is expected to work with a majority of the existing documents.The eqpcl utility internally translates the PCL command sequences and text into Postscript and uses GNU Ghostscript to create the PDF output.
Please note: This is a beta test version. Please report any problems to the Eloquence support team at support@marxmeier.com with an example PCL file that demonstrates the problem.
InstallationThe eqpcl utility is distributed as a compressed archive. It is available for the same platforms as Eloquence B.08.10. Please obtain the archive file that is appropriate to your platform.
The following files and directories are included in the distribution archive: bin/eqpcl newconfig/config/eqpcl.cfg share/eqpcl/ps/SYM-0N.ps share/eqpcl/ps/SYM-4U.ps share/eqpcl/ps/SYM-8U.ps share/eqpcl/ps/barcode.psThe file structure is compatible with the Eloquence B.08.10 or B.08.00 release. eqpcl may be installed in the Eloquence directory. # cd /opt/eloquence/8.1 # tar xzf /tmp/eqpcl-*.tar.gzThe configuration template file may be copied to the Eloquence config directory to provide a customized default configuration. # cp newconfig/config/eqpcl.cfg /etc/opt/eloquence/8.1/ Windows installation instructions: The following files and directories are included in the distribution archive: bin/eqpcl etc/eqpcl.cfg.sam share/eqpcl/ps/SYM-0N.ps share/eqpcl/ps/SYM-4U.ps share/eqpcl/ps/SYM-8U.ps share/eqpcl/ps/barcode.psThe file structure is compatible with the Eloquence B.08.10 or B.08.00 release. eqpcl may be installed in the Eloquence directory, using the procedure below:
Prerequisites: Creation of PDF documents depends on the GNU Ghostscript utility which must be present on the system.
Command Line OptionsThe eqpcl utility supports the following command line options:usage: eqpcl [options] [pcl files ...] options: -help This usage information -c cfg specify config file (default is eqpcl.cfg, ~/.eqpcl) -o out specify output file (default is stdout) -p create PDF output -s create postscript output -m file specify file with PDF marks -a analyze pcl data (-aa more verbose) -g pass to ghostscript -V output version and exitThe option -c is used to specify a config file that defines some configuration and PCL defaults. If no configuration file is specified:
The option -o is used to specify the name of an output file. If not present, the output is written to stdout so that eqpcl may be used in a pipe. The option -p is is used to create a PDF file as a result. In this case, eqpcl internally creates an intermediate Postscript result which is passed to Ghostscript to create the PDF. The option -s specifies to create a Postscript output instead. The option -a is used to analyze the PCL command stream. It writes its results to stdout. This option should not be used with the option -p or -s as this would result in a corrupted output. The option -m specifies a text file containing PDFmarks. The file content is added verbatim to the postscript output. This allows to specify PDF meta information (such as title, author or bookmarks). This file must comply with the PDFmarks syntax. Please refer to the pdfmark Reference manual for details. The option -g translates the PCL input and passes it to Ghostscript. This option does NOT create a PDF file but allows to use eqpcl as a simple frontend to Ghostscript (for example, to print the resulting document). Any number of PCL command files may be specified on the command line, which are then combined to a single document, each file separated by a PCL reset. If no file name is present, the input is read from stdin. This allows to use eqpcl in a pipe. Typical use: eqpcl -c eqpcl.cfg -p -o sample.pdf sample.pclThis creates a PDF document (sample.pdf) from PCL file sample.pcl. The config file eqpcl.cfg is used. cat sample.pcl | eqpcl -c eqpcl.cfg -p > sample.pdfThe PCL data is read from stdin and converted to PDF on stdout. eqpcl -a sample.pclAnalyze the file sample.pcl. This decodes the PCL commands and text. Outputs the results to stdout.
Using the eqpcl utility in an applicationThere are several ways how to use eqpcl from an Eloquence application:
Configuration fileThe eqpcl utility uses a config file to define custom settings. The config file is a text file with sections marked in square brackets and items and values separated by an equal sign. A hash sign (#) or semicolon (;) denotes a comment. Values can be enclosed in single or double quotes. In this case leading and trailing spaces are preserved. Section names and items are case insensitive.Unless specified on the command line, the config file is searched in the following locations:
Section [config]This section specifies some global settings for the eqpcl utility.ps.include =This specifies the path to the eqpcl ps include directory. It defaults to the share/eqpcl/ps directory in the Eloquence installation directory (e.g. /opt/eloquence/8.1/share/eqpcl/ps) and typically does not need to be specified. barcode = 1A non-zero value enables barcode support. By default, barcode support is disabled. Please refer to the section on barcode support for details. overlay = 1A value of 1 or 2 enables overlays from virtual trays. A zero value disables support of overlays. If overlay is set to one (default), the overlay is processed before rendering the page. If overlay is set to two then the overlay is applied when the page is completed. The default value is 1 and typically does not need to be specified. gs = /usr/bin/gsThe gs option specifies the path to the Ghostscript executable. By default (unless configured), the current PATH is used. On HP-UX and Linux, the default executable is gs. On Windows, the default executable is gswin32c.exe, but the Ghostscript installation directory is usually not located in the PATH. Therefore, the gs option should be explicitly configured, for example: gs = C:\Program Files\gs\gs9.00\bin\gswin32c.exe gs.paper.size =Allows to specify the paper size assumed by Ghostscript. Unless specified Ghostscript assumes a site specific default paper format. This config item should be specified if your PCL documents depend on a specific paper size. Typical values are "a4" or "letter" (both lower case). When specified, the Ghostscript -sPAPERSIZE option is used. Please refer to the Ghostscript documentation for details (Ghostscript paper sizes). gs.opt =This allows to specify custom Ghostscript command line options. Please refer to the Ghostscript documentation for details.
gs.pdf.opt =This allows to specify custom Ghostscript command line options that are used when creating PDF documents (eqpcl -p option).
gs.print.opt =This allows to specify custom Ghostscript command line options that are used when passing document to Ghostscript (eqpcl -g option).
gs.fontpath =This allows to specify custom Ghostscript font path. It is equivalent to setting the GS_FONTPATH environment variable. Please refer to the Ghostscript documentation for details.
include =This allows to specify a list custom postscript files that are included in the intermediate PostScript result. A comma separated list of files may be specified, a file extension of ".ps" is implied. Postscript files must be located in the location specified by ps.include config item (by default the eqpcl/ps directory).
Section [default]This section specifies the PCL defaults.paper.source = 1paper.source specifies the default paper tray. If a virtual tray is configured for this paper source then the defined overlay is applied to each page. paper.size = 26This specifies the default PCL paper size. The following values are recognized: 1 = EXECUTIVE 2 = LETTER 3 = LEGAL 6 = LEDGER 26 = ISO A4 27 = ISO A3The default is 26 (A4) symset = 4Usymset specifies the default symbol set. The following values are recognized. 8U = HP roman8 4U = HP roman9 (same as Roman8 with EUR sign) 9U = CP1252 0N = ISO latin1 (subset of cp1252)The default is 8U eolterm = 0eolterm specifies the default for the PCL CR/LF handling. The following values are recognized: 0 - CR = CR, LF = LF, FF = FF 1 - CR = CR+LF, LF = LF, FF = FF 2 - CR = CR, LF = CR+LF, FF = CR+FF 3 - CR = CR+LF, LF = CR+LF, FF = CR+FFThe default is 0. A value of 2 would be used to print UNIX text files. Section [tfN]The tf sections are used to specify a mapping of PCL typefaces to PostScript fonts. A separate section is defined for each typeface.[tfN] width = font height/width ratio (percent) #b#s = font name
The example below maps the PCL 4102 typeface id to the LetterGothic PostScript font. [tf4102] width = 54 0b0s = LetterGothic 1b0s = LetterGothic 3b0s = LetterGothic-Bold 0b1s = LetterGothic-Italic Section [barcode]This section is used to define the mapping of barcode and font id. Please refer to the section barcode support for details.Section [trayN]The Tray sections are used to define virtual trays. Please refer to the section virtual tray for details.
LimitationsThe eqpcl utility implements a commonly used subset of the PCL functionality. Any unsupported functions are silently ignored.The following PCL functions are not supported:
Any other fonts are mapped to Courier. As the eqpcl utility does does not read the font metrics and thus can't use the character width of proportial spaced fonts some text may be positionned improperly.
Virtual TraysThe eqpcl utility provides a virtual tray that may be configured in the config file. A tray config may specify eps include files along with position and scaling options.This is intended to ease the creation of custom forms. Instead of converting a custom form or logo into PCL format you may specify one or more EPS files (single page PS files _may_ work) to be used as overlay when the tray is used as a media source. An EPS file is a special postscript format that can only hold a single page. [trayN] # eps.file = path to include file (absolute path) # xofs = move object x position (in decipoints, from left) # yofs = move object y position (in decipoints, from bottom) # scale = scale factor (in percent) # align = align to paper edge (0=tl, 1=tr, 2=bl, 3=br, 4=orig) # multiple objects are allowed, each starting with eps.file
To create an EPS file, save or export your image or document as EPS file. A single page Postscript file may work as well (but is not supported as there could be side effects). On Linux or HP-UX the ImageMagick conversion utility or the netpbm utilities may be used to convert a variety of image formats to an eps file. For example: giftopnm sample.gif | pnmtoeps > sample.eps jpegtopnm sample.jpeg | pnmtoeps > sample.eps convert sample.png sample.eps
Barcode SupportThe eqpcl utility provides support for the Postscript barcode writer created by Terry Burton. When the barcode functionality is enabled in the configuration, the barcode code is included in the PS output and eqpcl creates calls from the PCL data.Please refer to http://code.google.com/p/postscriptbarcode/wiki/Options for more information on supported barcode types ("Symbologies") and their options. When enabled, the barcode is identified by a font id (type face) and mapped to a barcode encoding and option. The barcode height is automatically scaled according to the font height. The barcode encoding and any number of options may be specified, separated by a space. Any number of barcode definitions may be present. To enable barcode support the following setting in the configuration is required: [config] barcode = 1The following setting defines the font 9900 as code39 with the option "includetext". The font 9901 is defined as code93 with the additional options "includetext" and "includecheck". [barcode] 9900 = code39 includetext 9901 = code93 includetext includecheckVarious barcode types are supported, including Code 39, Code 93, Code 128, EAN, Code 2 of 5, Data Matrix, etc. The supported options depend on the barcode type. The includetext option is typically supported and results in printing the clear text beneath the barcode. The includecheck option is supported with some barcode types and causes an extra check digit to be generated. The barcodes and options may be tried interactively on the web site http://www.terryburton.co.uk/barcodewriter/generator/
Third party licensesThe Postscript code in ps/barcode.ps is provided under the following license:Barcode Writer in Pure PostScript http://www.terryburton.co.uk/barcodewriter/ Copyright (c) 2004-2011 Terry Burton - tez@terryburton.co.uk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Change historyThe eqpcl 0.6 release incorporates the following changes:
The eqpcl 0.5 release incorporates the following changes:
The eqpcl 0.4 release incorporates the following changes:
The eqpcl 0.3 release incorporates the following changes:
© Copyright 2010-2011 Marxmeier Software AG. All rights reserved. Revision: 2011-10-17 | ||||||||||||||||||||||||||