批量指印pdf并指定页码命令行
(2020-10-10 17:27:16)Usage
Typical usage would be
gsprint golfer.ps
gsprint -colour colorcir.ps
You may need to configure gsprint with a gsprint.cfg file. See the configuration section below.
Command line options are:
- -help
- Print usage summary
- -mono
- Render in monochrome as 1bit/pixel
- -grey or -gray
- Render in greyscale as 8bits/pixel
- -colour or -color
- Render in colour as 24bits/pixel
- -query
- Show printer setup dialog
- -noquery
- Don't show printer setup dialog
- -printer "name"
- Print to the specified printer
- -noprinter
- Use default printer
- -port "name"
- Print to the specified printer port, instead of the default for the printer
- -ghostscript "name"
- Path and filename of command line Ghostscript
- -config "name"
- Read options from this file, one argument per line.
- -odd
- Print only odd pages
- -even
- Print only even pages
- -all
- Print all pages
- -from NN
- First page to print is NN
- -to NN
- Last page to print is NN
- -twoup
- Two pages per sheet
- -portrait
- Portrait orientation
- -landscape
- Landscape orientation
- -duplex_vertical
- Duplex (for long edge binding)
- -duplex_horizontal
- Duplex (for short edge binding)
- -copies NN
- Print NN copies (if supported by Windows printer driver)
- "filename"
- The PostScript/PDF file to print
- -
- Tell Ghostscript to read PostScript from standard input
Defaults are -mono
-noquery -noprinter -all
Unrecognised options are passed on to Ghostscript.
The filename to print must be the last option.
If neither -query nor -printer are used (the default), the default printer will be used. This is equivalent to -noquery and -noprinter.
-all overrides -odd,
-even, -from and -to.
DSC comments are ignored.
-odd, -even, -from and -to operate by rendering every page but only
sending the selected pages to the printer.
Printing one page out of a 200 page document using "-from 100 -to
100" will result in a long wait before and after the page is
printed.
If using "-from 10 -odd", the first page printed will be 11.
The last occurence of -mono, -grey, -colour is used.
Page size and margins cannot be set from the command line. These are obtained from the printer driver. To change the page size, change your printer settings.
Ghostscript options that must not be used are:
-r -g -sDEVICE= -sOutputFile= -sPAPERSIZE=
These are either used by, or interfere with gsprint.
Possible future options are:
-twoup -scale NN.NNN -papersize A4