SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Presented by Allen Miglore
Synergetic Data Systems, Inc.
Session 6
PostScript® vs. PCL PrintingPostScript is a registered trademark of Adobe Systems Incorporated
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Why PostScript?
• Through version 6, UnForm supported PCL5 and PDF output formats. PCL5 was the language standard for laser printers.
• Starting in 2005, HP reduced support for PCL5 by eliminating scalable PCL fonts from some new printer models. All PCL text was rendered in Courier.
• SDSI chose to develop a PostScript driver.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
PostScript History
• PostScript was developed in the 1980’s by Adobe, for use in the printing and typesetting industry. – The Apple Laserwriter was an early consumer
printer with PostScript.
• PostScript 2 and 3 were released in the 1990’s.
• PostScript is widely supported on laser printers today – often PostScript 2.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
PostScript vs. PCL5
• PostScript is a programming language– PCL5 is a page description language
• PostScript is verbose, large print streams– PCL5 is concise, smaller print streams
• PostScript is extendable to support any device capability– PCL5 has a defined specification of device
capabilities
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Key UnForm Differences
• Print stream size increase means longer transmission times to printer
• Device capabilities are controlled by commands that differ by printer (duplex, tray, and bin control)
• Image support differs (eps and jpeg)
• Base fonts are similar, but UnForm also supports Type1 soft fonts
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Device Capability Example
• In PCL5, a tray selection command was always ESC +”&l#H”. The UnForm tray 1 command always sent ESC+”&l1H”.
• In PostScript, trays are given names, which vary by printer, and a tray name is given PostScript code, which varies by printer.
• *InputSlot Upper/ Tray 1: "<</ManualFeed false /MediaPosition 3>> setpagedevice"
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
PPD Files
• Since printer control varies by model, a configuration file is necessary. Vendors publish Postscript Printer Definition (PPD) files for their printers.
• A PPD file is simply a map of capability names to the code sequences that are sent to the print stream.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
PPD Files Contain Code
• Vendor PPD files give capabilities names rather than codes.– Upper or HighCapacity rather than 1 or 5
• For UnForm, PPD files describe:– Trays as *InputSlot name: code– Bins as *OutputBin name: code– Duplex as *Duplex name: code
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
UnForm Reads PPD Files
• Example: a tray command will cause UnForm to lookup the code associated with the *InputSlot definition of that tray.
• Any two PPD files will likely have different names for the same capability– None will have codes like PCL (1,4,5,etc.)
• PPD files can be customized to match rule file names for tray, bin, and duplex.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Locating a PPD - Internet
• Look in the drivers or software sections of the manufacturer’s web site
• Look in the linixprinting.org web site: http://linuxprinting.org/download/PPD
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Locating a PPD - Windows
• Install drivers for the printer– If there’s a choice, be
sure to include Postscript drivers
• Search for *.ppd• Copy/paste the ppd
file for your model
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
PPD Files are Always Used
• UnForm comes with two default PPD files– pcl.ppd – traditional PCL escape sequences– ps.ppd – based on hp4000.ppd, customized
to show traditional tray and bin codes
• The pcl.ppd file supports the traditional PCL coded sequence, plus named sequences modeled on ps.ppd.
• The ps.ppd file supports both as well, showing how customization can be used.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
PPD File Selection
• UnForm supports PPD files with the –m model command line option.– -m hp4000 uses ppd/hp4000.ppd
• Without a –m option, UnForm uses pcl.ppd or ps.ppd, depending on the driver in use.
• Rule sets can have model-specific sections:if uf.model$="hp4000"
…
end if
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
During Printing…
• UnForm loads the specified (-m model) or default ppd file at the start of the job.
• When UnForm encounters a tray, bin, or duplex command, it looks up the code:– tray upper looks for the pattern “*InputSlot
*upper*:” and inserts the related code.– tray 5 looks for the pattern “*InputSlot *5*:”
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Correcting the Mismatch
• UnForm rule files traditionally use PCL code numbers for printer control.
• PPD files use names rather than PCL codes to identify printer control features.
• To solve, edit PPD file to provide PCL codes as synonyms, or change commands to use PPD names. See ps.ppd.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Image Differences
• Color PostScript printers support EPS and JPEG files.
• Monochrome PostScript printers support only EPS, and error on JPEG files.
• Scaling is supported by the printer.
• The attach command is implemented as an image command scaled to the full page.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Image Name Substitutions
• If an image has a .pcl or .prn extension, and the image mode is not color, UnForm will automatically look for a .eps file.
• If an image command has a .rtl extension, or the image mode is color, UnForm will automatically look for a .jpg file.
• Color image mode is indicated by -ci or -color command line options, or a “color” image command option.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Image Conversion
• Image Magick can produce EPS or JPEG if eps= and jpeg= [images] lines are configured.
• The Windows Support Server can produce EPS or JPEG images as well.
• The web site image conversion utility can produce EPS and JPEG images, if you want pre-created files.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
PostScript Fonts
• There are three standard built-in fonts, plus two symbol fonts, in every PostScript device. The three standard fonts come in normal, bold, italic, and bold-italic.– Courier, Helvetica, Times-Roman
• Other fonts can be provided using Type1 soft font files.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Internal Font Mapping
• UnForm is designed to select fonts by a PCL font number. In ufparam.txt, names are mapped to numbers in the [fonts] section.
• For PostScript, font numbers are mapped in the [psmap] section to a font name found in the psfont directory:– 4101=Times-Roman,Times-Bold,Times-Italic,Times-BoldItalic
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
The psfont Directory
• Each PostScript font has a .afm file, and non-internal fonts have a .pfa or .pfb file.
• The .afm file stores character size metrics
• The .pfa/.pfb files are soft fonts that can be downloaded with jobs that use them.
• A Type1 font will provide the above files.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Type1 Font Example: MICR
• In ufparam.txt, in the [psmap], is this line:MICR=15002
• In the psfont directory are these files:MICR.afm
MICR.pfa
MICR.pfb
• A text command using font 15002 will produce MICR output.
SDSI Technical Conference 2007 ■ Sacramento, CA USA ■ October 18-20
I n t e l l i g e n t T o o l s
Questions
• Answers