Postscript
Postscript
Postscript
Programming
Guide
No part of this document may be reproduced without the express permission of Ricoh
Printing Systems America, Inc.
The material in this document is for informational purposes and is subject to change
without notice. Ricoh Printing Systems America, Inc. assumes no responsibility for
errors or omissions in this document. No liability is assumed for any damages resulting
from the use of the information it contains.
TRADEMARK
Digital Document Publisher, DDP, DDP 70, DDP 70e, DDP 92, and their associated
logo marks are trademarks of Ricoh Printing Systems America, Inc. All rights reserved.
All other terms and product names may be trademarks or registered trademarks of their
respective owners, and are hereby acknowledged.
NOTICE TO USER
In an effort to meet the demands of a rapidly changing technology, the manufacturer is
continually developing new features and functions to meet your changing printing or
printer needs. Please be sure to consult all manual updates or addenda when using
this product’s documentation.
Table of Contents
iii
Chapter 2. I/O Setup
Postscript I/O Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
TBCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Index
iv
Chapter 1
PostScript Languange Printer Commands
Overview
Printer commands for Adobe PostScript 3 provide a way for you to communicate with
the printer to perform certain tasks.
This document provides programming information about Adobe PostScript 3 and
contains most of the PostScript commands. It is written for people who are familiar
with the command structure of the PostScript language. Most software applications do
not require you to enter printer commands. However, if needed, you should refer to
your software documentation for information about how to enter printer commands.
This document also describes the particular PostScript interpreter parameters and
resources implemented for the printer. The printer has features and capabilities that
might not be present in other PostScript printers and that are not documented
elsewhere.
The following documents are generally relevant to the operation and programming of
PostScript printers.
n PostScript Language Reference Manual, Third Edition (Addison-Wesley),
(hereafter referred to as the Reference Manual), describes the programming
language used to tell printers what and how to print. It describes features of the
language available in all PostScript interpreters.
n The PostScript Language Reference Manual Level 3 Version 3010 and 3011
Supplement (Adobe), (hereafter referred to as the Supplement), provides an up-to-
date catalog of standard page device, user, system, and device parameters. It
includes parameters that have changed since their original description in the
PostScript Language Reference Manual, Third Edition.
n PostScript Language Tutorial and Cookbook (Addison-Wesley) contains
explanatory and tutorial material to improve users’ understanding of the
PostScript page description language. It introduces the PostScript language at a
basic level.
n PostScript Language Program Design (Addison-Wesley) teaches programming
principles unique to the PostScript language with many usable samples. It is for
programmers interested in the effective and efficient design of PostScript
language programs and printer drivers.
n PostScript Printer Description File Format Specification (Adobe) describes the
PostScript Printer Description (or PPD) file format which provides information in
a machine-readable form about printer-specific features and about the fonts built
into the printer.
n PostScript Printer Description File for the Printer, available from the Adobe
Developers Association, provides a device-independent way of invoking
device-dependent features. It is needed by some drivers to offer complete device
functionality to the user.
Printer
The following page device parameters are present in the printer. The semantics for the
parameters appear in the Reference Manual and the Supplement.
The following table lists all the page device parameters for the /Printer device.
Collated Uncollated
QTY COPIES /NumCopies /Collate
Copies Copies
- - - - n/a n/a
- - - true n/a n/a
- - - false n/a n/a
a - - - a n/a
a - - true a n/a
a - - false a n/a
- b - - b n/a
- b - true b n/a
- b - false n/a b
- - c - c n/a
- - c true c n/a
- - c false n/a c
a b - - a*b n/a
a b - true a*b n/a
a b - false a b
a - c - a*c n/a
a - c true a*c n/a
a - c false a c
- b c - c n/a
- b c true c n/a
- b c false n/a c
a b c - a*c n/a
a b c true a*c n/a
a b c false n/a c
- Parameter not set.
a Numeric value entered for PJL QTY environment variable.
b Numeric value entered for PJL COPIES environment variable.
c Numeric value entered for PostScript /NumCopies parameter.
n/a Not applicable.
Physical Staple
Location Staple Location
Position (LEF/SEF)
0 invalid
1* <Saddle Stitch>
2 <Center>
3 <Front Corner>
4 <Rear Corner>
5 invalid
10 <Top Left> Top/Bottom
11 <Top Center> Center
12 <Top Right> Bottom + 180° rotation/Top
13 <Center Right> Center + 180° rotation
14 <Bottom Right> Top + 180° /Bottom + 180° rotation
15 <Bottom Center> Center + 180° rotation
16 <Bottom Left> Bottom + 180° rotation
17 <Center Left> Center
* Booklet Finisher and Publishing Finisher only.
TraySwitch
This boolean controls whether other trays of the same paper size and media type are
used when the current tray empties. The MBT is not used for this switching. If this
parameter is true, then, when a tray empties the printer searches for a tray containing
the same paper size and media type starting with Tray 1 and searches in order through
HCF, except MBT and Inserter Trays. The value of Priority is not used to determine the
tray switching order.
FoldType
OutputType Meaning
(Stacker 0)* Sample Tray
(Stacker 1) Standard Tray
(Stacker 2) Elevator Tray
(Stacker 3) Upper Tray
(Stacker 4) Booklet Tray
(Stacker 5)* Stacker 5
(Stacker 6)* Stacker 6
(Stacker 7)* Stacker 7
(Stacker 8)* Stacker 8
(Auto)* Autocascade
OutputTrayMask
This operator masks individual output tray (Stacker) for Autocascade.
Example: [x] statusdict / outputTrayMask get exec
x means integer of Stacker number.
Processing Options
The following sample shows the syntax required to change the /Staple parameter,
causing a Set Break to occur.
%!PS
/ston { ÄStaple On
<</Staple 1>> setpagedevice
clippath stroke showpage
} def
/stoff { ÄStaple Off
<</Staple 0>> setpagedevice
clippath stroke showpage
} def
The table below describes a five-page job that changes the /Staple twice within the job.
User Parameters
User parameters can be altered, within reasonable limits, by any PostScript language
program without requiring a password. The user parameters establish temporary
policies on matters such as whether to insert new items into caches.
The setuserparams and currentuserparams operators are used to set and get the
current values of the user parameters. The initial value of user parameters at the time
the printer is turned on for the first time is product dependent. Unless otherwise
specified, all user parameters are subject to save and restore.
Listed below are the user parameters present in the printer.
Key Type Default For More Information
AccurateScreens boolean false See Section 3.1 of the Supplement.
JobName string () See Section 3.1 of the Supplement.
JobTimeout integer 0 See Section 3.1 of the Supplement.
MaxDictStack integer 530 See Section 3.1 of the Reference Manual.
MaxExecStack integer 10015 See Section 3.1 of the Reference Manual.
MaxFontItem integer 12500 See Section 3.1 of the Reference Manual.
MaxFormItem integer 100000 See Section 3.1 of the Reference Manual.
MaxLocalVM * integer 80% of RamSize See Section 3.1 of the Reference Manual.
MaxOpStack integer 100000 See Section 3.1 of the Reference Manual.
MaxPatternItem integer 20000 See Section 3.1 of he Reference Manual.
MaxScreenItem integer 48000 See Section 3.1 of the Reference Manual.
MaxUPathItem integer 5000 See Section 3.1 of the Reference Manual.
MinFontCompress integer 1250 See Section 3.1 of the Reference Manual.
VMReclaim integer 0 See Section 3.1 of the Reference Manual.
VMThreshold integer 40000 See Section 3.1 of the Reference Manual.
WaitTimeout integer 40 See Section 3.1 of the Supplement.
* Value is a read-only constant.
MaxFontItem
The key MaxFontItem indicates the maximum number of bytes occupied by the pixel
array of a single character in the font cache.
MaxDisplayList
The default value for this parameter is memory dependent.
MaxFontCache
The default value of MaxFontCache is memory dependent.
MaxPermanentVM
The default value for this parameter is the largest positive integer.
MaxRasterMemory
The default value of MaxRasterMemory is memory and print mode (simplex/duplex)
dependent.
MaxSourceList
The default value for this parameter is memory dependent.
RamSize
The value of RamSize is the actual size of installed memory. It ranges from 41943040
for 40 megabyte systems to 134217728 for a 128 megabyte system.
Model Strings
The systemdict operators LicenseID and PrinterName have the following values.
String Name Type Value
70 ppm:
(LN-091-002) Roman Font
(LN-091-003) Morisawa 2 Font
(LN-091-001) Morisawa 5 Font
LicenseID integer
92 ppm:
(LN-091-004) Roman Font
(LN-091-005) Morisawa 2 Font
(LN-091-006) Morisawa 5 Font
(Enter the name of the printer here,
PrinterName string
depending on the model.)
product* string (Enter the name of the product here.)
* Also defined in statusdict.
Device Parameters
Device parameters are set using the operator setdevparams and read using the
operator currentdevparams. Device parameters are similar to system parameters in
that they require a password, are global to the PostScript environment, and have similar
persistence characteristics. As with system parameters, some of these parameters can
be stored in non-volatile memory.
One property that distinguishes device parameters from both system and user
parameters is that device parameters may be interdependent: the legality of a value for
a given parameter might depend on the value of another parameter.
NOTE:
Even if two products have the same device parameters set name, the
parameters in the set might differ; for example, because the hardware
support for that device differs.
Operators in userdict
11x17 b4
a3 b5 letter
a4 folio lettersmall
a4small ledger note
a5 legal
Operators in systemdict
devdismount devformat
devstatus
devforall devmount
TBCP
In the TBCP mode the printer will recognize and process the special characters as
specified in the table below.
ASCII ASCII VALUE
CONTROL FUNCTION PRINTER BEHAVIOR
KEYBOARD NAME (HEX)
The ^C special character causes an interrupt error. Data that follows a ^C character is
discarded until a ^D character is received.
The ^T special character causes PostScript to return its status via the back-channel. If
the PostScript interpreter is waiting for a job, the status string “%%[ status: idle ]%%”
is sent. If the PostScript interpreter is busy processing a job, the status string “%%[
status: busy; source: Network ]%%” is sent.
The ^D special character forces the end of PostScript job.
To transmit control characters as data, the host software must quote the character.
Quoting is done by replacing the character with the two-character sequence: ^A
followed by the character itself XOR-ed with 0x40. For example, to send a byte with
the hex value 0x14, the two-byte sequence 0x01 0x54 is sent.
All other special characters are ignored.
Index-i
M device parameters 1-14
device setup 1-3
ManualFeed parameter 1-4 interpreter parameters 1-10
ManualFeedTimeout parameter 1-4 Level 1/Level 3 compatibility 1-23
ManualSize parameter 1-20 page device parameters 1-3
Margins parameter 1-4 resource category 1-18
MaxDisplayList parameter 1-12, 1-13 system parameters 1-11
MaxFontCache parameter 1-12, 1-13 user parameters 1-10
MaxFontItem key 1-10 PrepareAction parameter 1-15
MaxFormCache parameter 1-12 PrinterName operator 1-14
MaxImageBuffer parameter 1-12 PrinterName parameter 1-12
MaxOutlineCache parameter 1-12 ProcessColorModel parameter 1-5, 1-20
MaxPatternCache parameter 1-12 product operator 1-14
MaxPermanentVM parameter 1-12, 1-13 product strings 1-14
MaxRasterMemory parameter 1-12, 1-13
MaxScreenStorage parameter 1-12
R
MaxSourceList parameter 1-12, 1-13
MaxUPathCache parameter 1-12 RamSize parameter 1-12, 1-13
MediaType parameter 1-4 RealFormat parameter 1-12
MediaWeight parameter 1-4 regular resources 1-18
model strings 1-14 Removable parameter 1-15, 1-16, 1-17
Mounted parameter 1-15, 1-16, 1-17 resource categories 1-18
resource instances 1-18
N revision operator 1-14
Revision parameter 1-12
NumCopies parameter 1-4
S
O
Searchable parameter 1-15, 1-16, 1-17
operators SearchOrder parameter 1-15, 1-16, 1-17
in statusdict 1-23 serialnumber operator 1-14
in systemdict 1-23 set break 1-9
in userdict 1-23 setdefaultpapertray operator 1-25
OutputAttributes parameter 1-5 setdevparams operator 1-14
OutputDevice parameter 1-5 setpapertray operator 1-25
OutputDevice types 1-20 setsystemparams operator 1-11
OutputFaceUp parameter 1-5 setuserparams operator 1-10
OutputPage parameter 1-5 staple locations 1-7
OutputType parameter 1-5 Staple parameter 1-5
StapleDetails parameter 1-5
P StartJobPassword parameter 1-12
StartupMode parameter 1-13
PageCount parameter 1-12 statusdict operators 1-23
PageDeviceName parameter 1-5 system parameters 1-11
PageSize parameter 1-5, 1-20 systemdict operators 1-23
paper size compatibility operators 1-26 SystemParamsPassword parameter 1-13
paper tray compatibility operators 1-26
PhysicalSize parameter 1-15, 1-16
T
Policies parameter 1-5
Poll parameter 1-18 TargetId parameter 1-18
PostRenderingEnhanceDetails 1-3 tray numbers in compatibility operators 1-24
PostScript TraySwitch parameter 1-5, 1-7
compatibility operators 1-23 Tumble parameter 1-5
Index-ii
Type parameter 1-15, 1-16, 1-17, 1-18
U
userdict operators 1-23
V
version operator 1-14
W
WaitTimeout parameter 1-13
Writable parameter 1-15, 1-16, 1-17
Index-iii
Index-iv