Saturday, October 31, 2009

PRINT PDF DOCUMENTS FROM COMMAND LINE (UNIX)

Printing PDF documents from the command line (UNIX)

Besides printing directly from within Reader by choosing File > Print, you can
print PDF files from the command line. The syntax for printing from the
command line is:
acroread -toPostScript

Note:

If a PDF file has been secured with an Open password or does not allow
printing, you will not be able to print from the command line.

For example, to print the file
sample.pdf
to the default printer, type the
following:
% cat sample.pdf | acroread -toPostScript | lp
You can use
to control your print job from the command line.
Options available to Reader are the following.To create a Language Level 1, 2, or 3 file:
-level1 or -level2 or -level3

Note

: -level2 is the default setting.
To print a PDF file to a differently named PostScript file:
-pairs
filename2> ...
For example, to print
sample.pdf
to
test.ps
, you would use the following syntax:
acroread -toPostScript -pairs sample.pdf test.ps
To use the printer’s default halftone screens instead of custom halftone
screens included in the file:
-printerhalftones
To create a binary PostScript file:
-binary
To download fonts once per document rather than once per page:
-fast
To print a range of pages:
-start -end


To print the document in a landscape orientation:
-landscape
To reverse the page order of the output:
-reverse
To output only odd-numbered pages:
-odd
To output only even-numbered pages:
-even
To shrink, expand or rotate a document, as necessary, to fit the page on
which it will be printed:
-shrink
To scale the document:
-scale
To control the page size:
-size

where width and height can be numbers or letter, tabloid, ledger,
legal, executive, a3, a4, a5, b4, b5,
or wxh (
custom paper
size where w
is the integer width in points and h
is the integer height in
points).
To turn off the print annotations feature:
-annotsOff

Related Posts



No comments:

Post a Comment