--saved-pages=...
)Saved pages can be printed in any order, any number of times allowing for copy collation, manual 'duplex' printing or selecting a subset of pages.
Many raster printing devices and raster image format devices can use the command list (clist) to save the rendering information into files or memory based structures. Usually the clist data is rendered as soon as the page is complete, but it is` possible to defer rendering, then output (print) after the entire file has been converted to clist files.
Since each page is saved separately, the pages can be rendered from the clist files in any order, any number of times.
The saved pages are accumulated in clist form as files or in memory. The default
clist storage is specified by the BAND_LIST_STORAGE=
macro in the
make file, but if BAND_LIST_STORAGE=file
, the clist can be forced
to be in memory using the -sBandListStorage=memory
option.
Deferring printing is controlled using the --saved-page=...
option.
The string following the --saved-page=
consists of keywords,
separated by white-space, commas, or other non-alphanumeric characters
such as ':', '=', ';'. If more than one keyword is given, the string should
be enclosed in double-quotes ("
).
The '-
' (dash), and the '*
' asterisk), are used in
page range selections, and cannot be keyword separators.
Keywords are case independent, thus "begin
",
"BEGIN
", and "Begin
" are all equivalent.
begin
If the device was set for rendering into memory, is will be switched to
accumulating the page as clist files, thus -dMaxBitmap
and
-dBandingNever
will be ignored, as if -dBandingAlways
was specified.
flush
saved-pages
mode. Subsequent
pages will be added to the list.
end
The device may render subsequent pages in memory (page buffer) as determined by -dMaxBitmap and -dBandingNever.
copies
copy_count
print
action. The requested number
of copies will be generated for all subsequent print actions, thus
producing collated copies, rather than multiple copies of
each page as in normal (non-deferred) rendering and output.
A --saved-pages="copies #"
option will be applied to all
print actions until a new copies #
is encountered
that sets the copy count to a different value. Since the
copies
can follow the print
command, it is
recommended that only a single copies
be in a each
--saved-pages=
... string.
Note, that unless -d.IgnoreNumCopies=true
is specified
prior to starting saved-pages
mode, the copy count for
each page will be saved with each page, and the job will contain the
specified number of copies of each page, as well as producing the
number of collated copies of the job set by the copies
in a --saved-pages=
... string.
print
print keywords
print
action keyword determine what is
printed, and in what order. The keywords are described in the next
section.
The string following the print
action keyword determines which pages
from the list are printed, in what order. Any sequence of keywords, page numbers
or page ranges can follow the print
keyword. The first control keyword
(other than copies
) ends the list of printing keywords.
As with control keywords, print keywords can be any mixture of upper or lower case,
and print keyword, page numbers and page ranges can be seperated by any non-alphanumeric
character other than '-
' or '*
'.
The following are all equivalent:
1 3 5 - *
1, 3, 5-*
1,3,5-*
copies
copy_count
copies
keyword and count can follow the print
keyword. See the description of the copies
keyword in the previous section.
The copy count will be applied to the entire sequence of print keywords, so it can appear anywhere in the sequence of page number, page ranges or print keywords.
normal
"1 - *"
reverse
"* - 1"
odd
even
keyword and user interaction to place pages that
were printed into the input tray, can be used for manual duplexing.
even
odd
keyword and user interaction to
place pages that were printed into the input tray, can be used for manual duplexing.
even0pad
even
keyword.
-
' specifies a single page from the
list to be printed. The '*
' character represents the last page in
the list, interpreted as a number, either as a single page_number or as the
start_page or end_page in a page range.
-
end_page
*
separated by a
'-
', optionally surrounded by non-alphanumeric characters other than
'-
' which is a special character in page range specifications. The
pages from the start_page to the end_page are printed.
If the start_page is after the end_page, then the order of the pages is reversed, from the start_page back to the end_page.
Print the last page, followed by all pages in reverse order, then the first page (print reverse with two copies of the last and first page):
- --saved-pages="print: normal, copies=2"
- --saved-pages="print copies=2, normal"
- --saved-pages="copies 2 print normal"
- --saved-pages="print 1-* 1-*"
- --saved-pages="print normal normal"
Using the command line arguments with a PostScript or PDF input file to print the odd pages, prompt the operator to reload the printer with the pages that were printed, then print the even pages:
- --saved-pages="print * reverse 1"
- -or-
- --saved-pages="print * * - 1 1"
Print two collated copies of the first file, followed by 5 copies of the second file:
- gs -sDEVICE=pgmraw -o /dev/lp0 --saved-pages="begin" examples/annots.pdf \
- --saved-pages="print odd" \
- -c "(Move printed pages to the input tray, then press enter.) = flush .confirmread)" \
- --saved-pages="print even"
- gs -sDEVICE=pgmraw -o /dev/lp0 --saved-pages="begin" examples/annots.pdf \
- --saved-pages="copies=2 print normal flush" \
- examples/colorcir.ps \
- --saved-pages="copies=5 print normal"
Copyright © 2013 Artifex Software, Inc. All rights reserved.
This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of the license contained in the file LICENSE in this distribution. For more information about licensing, please visit http://www.artifex.com/licensing/ or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, San Rafael, CA 94903, U.S.A., +1(415)492-9861.
Ghostscript version 9.22, 4 October 2017