[Note: From 2000 onwards, this page is no longer actively updated]
How to generate portable Postscript
The problem
Many people post Postscript documents on their home pages.
Unfortunately, it is often difficult for other people to print these
documents after downloading. The printer is usually of a different
model than the authors, and the document is often incompatible with
it.
Typical problems include:
- Paper size is fixed explicitly. American papers often use "Legal"
paper format, whereas Europeans use "A4". The printer will
refuse to print and say "insert A4".
- The document contains special fonts not present in the printer.
- Postscript is preceded by printer control characters.
- The printer prints ASCII codes of the Postscript instead
of rendering the document.
- Previewers such as Ghostview will refuse to display page
numbers.
- Poor quality of printout, due to differences in resolution.
- Documents will not print on both sides of a duplex printer,
even though duplex mode is enabled.
- Unnecessary large files and slow downloading due to inefficient
encoding of images.
- Color that does not display on black and white printers.
The Solution
Generate a lowest common denominator Postscript!
Portable Postscript from LaTex/dvips
The latest versions of dvips have disabled document structuring
comments by default.
the default settings of the
DSC comment flag. dvips latest version: changed default of DSC flag; you must generate
DSC comments for PsUtils to work.
Portable Postscript using Microsoft Windows Drivers
How to set up the printer driver
We want to set up the driver to print to disk, and maximize the
portability of the document.
Windows NT 4.0
Note: You need the NT disk if the printer driver is not already installed.
- Click on "Add Printer" under Printers
- Select printer managed by MyComputer (local printer, not network printer)
- Select FILE (port) (check mark the entry)
- Select a driver for a 300 dpi, PS level 1 printer:
e.g. LaserWriter Personal NT
- After completing the driver installation, disable Job Control Codes and Enable Page independence
Specifically, Right click on the printer, select Document defaults
Postscript Options -> Generate Job Control Code: No
Page Indpendence: Yes
Ctrl-D after Job: NO
- (Optional) Enable duplex printing
After installing a printer that supports duplex printing,
Right click on printer, select Document defaults
Paper/Output -> Print on Both Sides (Duplex Printing)->
Long side
Another way to enable duplex printing is to manually remove the
explicitly references to duplex in the generated Postscript files.
Delete Postscript such as:
%%BeginFeature: *Duplex None
<</Duplex false>> setpagedevice
%%EndFeature
Windows 95
- Select a driver for a 300 dpi, PS level 1 printer:
e.g. Apple LaserWriter
- Disable Ctrl-D after jobs.
Postscript->Advanced->Ctrl-D do not send after job
(ow. "Offending command")
- Add Adobe Document structuring comments.
Postscript->Optimize for portability
Portable Postscript from TeX and LaTeX
TeX and LaTeX by default embed bitmapped fonts into the Postscript
documents. These fonts are resolution dependent and produce poor
results when printed at other resolutions (e.g. when previewed on the
screen, or when printed on 300 dpi printers instead of 600dpi).
See Adobe
tips for generating PDF from TeX. These tips describe how to
generate Postscript
Postscript as well.
Copyright issues
Some fonts embedded in your Postscript documents may not be publicly
distributed!
Postscript links
- Richards PS page.
- Excellent collection of Postscript links.
- Fixing
PostScript files
- Postscript error messages.
- mirror
of old Luminous Corporation page
- Postscript troubleshooting and Postscript errors.
- Postscript resources
- Links to FAQs, Postscript tutorials, newsgroups.
- NSF
guide
- Generate good PDF from Postscript and LaTeX
- SIGGRAPH guide
- Examples of good/bad PDF depending on what fonts are embedded.
- Postscript
Wiki
- Useful Postscript code snippets.
- Postscript FAQ v. 2.3
- Frequently asked questions.
- Postscript Corner, University of
Zurich
- Discusses the Postscript language, fonts and others.
- Adobe
- The technical solutions database is occasionally useful.
AdobePS Postscript driver is available. This driver is supposedly
better than the driver included with Windows 95, but is not compatible
with Windows NT.
- Online postscript generation from LaTeX documents.
- This may be an excellent solution for LaTeX document portability.
References
- Adobe Document Structuring Comments (DSC) (in pdf format)
- (unfortunately I could no longer find this document on Adobe's site.)
Other Solutions
Avoid publishing Postscript altogether! For example you may want to
publish using Hypertext (HTML), Adobe Acrobat (PDF), DVI files
(from TeX), or even Microsoft Word format (DOC, RTF).
However, note that PDF is closely linked to Postscript, so many of the
above issues still apply to it.
Fixing specific Postscript problems
Printers prints ASCII file with Postscript source
Make sure that the Postscript file starts with the two characters:
%!
Enable duplex printing
Scan the Postscript for code that disable duplex mode, such as:
%%BeginFeature: *Duplex None
<</Duplex false>> setpagedevice
%%EndFeature
Replace this Postscript by:
%%BeginFeature: *Duplex DuplexNoTumble
<</Duplex true /Tumble false>> setpagedevice
%%EndFeature
Also, enable duplex mode in your printer.
Tell the printer to ignore paper-size differences between A4 and
Letter
Newer printers can ignore paper-size specifications requesting A4 when
Letter is loaded in the paper tray and vice-versa.
You may need to configure your printer to do this.
For example, the HP Laserjet Series 8100 has a menu option:
Paper handling menu -> Override A4/Letter. Set it to Yes.
FrameMaker 4 explicit paper size
Symptom: FrameMaker 4 specifies what paper size is used, e.g. Legal,
and the printer has only A4. The printer then outputs a page saying:
Can't select requested paper size for Frame print job!
Solution: Edit the Postscript file as follows.
Search for: /PageSize
At the end of the line it says: stopped
Append to that the words: pop false
More FrameMaker 4
Postscript problems
FrameMaker 5 paper size
FrameMaker 5 Postscript defines a variable FMAllowPaperSizeMismatch to
allow or disallow printing on a different paper size.
Locate this variable definition and set it to true as below.
/FMAllowPaperSizeMismatch true def
FrameMaker repair filters
Other Portable Postscript pages
Other Typesetting pages
Typesetting
practices - make your documents look better.
Martin
Szummer, szummer@media.mit.edu.NOSPAM(remove
.NOSPAM suffix before sending)
Last modified: April 21, 2006