Where are ghostscript options / switches documented?
Solution 1
From the Overview of Ghostscript page, I found the Ps2pdf.htm page explains dPDFSETTINGS
:
-dPDFSETTINGS=
configuration
Presets the "distiller parameters" to one of four predefined settings:
/screen
selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting./ebook
selects medium-resolution output similar to the Acrobat Distiller "eBook" setting./printer
selects output similar to the Acrobat Distiller "Print Optimized" setting./prepress
selects output similar to Acrobat Distiller "Prepress Optimized" setting./default
selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file.
On the same page, MaxSubsetPct
only appears in a table of recognized "Acrobat Distiller 5 parameters defined in the DistillerParameters document included in the Acrobat SDK", and links to that SDK.
Instead of downloading the large SDK, I searched for "Distiller Parameters" on Adobe's site and found Adobe PDF Creation Settings which explains MaxSubsetPct on page 88:
MaxSubsetPct
Supported by: all applications
Type: integer
UI name: Subset embedded fonts when percent of characters used is less than: value %
Default value: 100The maximum percentage of glyphs in a font that can be used before the entire font is embedded instead of a subset. The allowable range is 1 through 100.
Distiller only uses this value if SubsetFonts is
true
. For example, a value of 30 means that a font will be embedded in full (not subset) if more than 30% of glyphs are used; a value of 100 means all fonts will be subset no matter how many glyphs are used (because you cannot use more than 100% of glyphs).
Solution 2
To get a list of all these options supported by -dPDFSETTINGS=...
, you can do this:
gs \
-dNODISPLAY \
-c ".distillersettings {exch ==only ( ) print ==} forall quit"
You should see this Result:
/default -dict-
/prepress -dict-
/PSL2Printer -dict-
/ebook -dict-
/screen -dict-
/printer -dict-
You can execute the following Ghostscript command to query for the detailed settings of the -dPDFSETTINGS=/screen
parameter:
gs \
-q \
-dNODISPLAY \
-c ".distillersettings /screen get {exch ==only ( ) print ===} forall quit" \
| sort
This one queries Ghostscript's internal .distillersettings
dictionary, which holds a key named /screen
, whose value again is another dictionary... The output should be something like this (may vary slightly depending on your exact Ghostscript version):
/AutoRotatePages /PageByPage
/CannotEmbedFontPolicy /Warning
/ColorACSImageDict << /ColorTransform 1 /QFactor 0.76 /Blend 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2] >>
/ColorConversionStrategy /sRGB
/ColorImageDownsampleType /Average
/ColorImageResolution 72
/CompatibilityLevel 1.3
/CreateJobTicket false
/DoThumbnails false
/EmbedAllFonts true
/GrayACSImageDict << /ColorTransform 1 /QFactor 0.76 /Blend 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2] >>
/GrayImageDownsampleType /Average
/GrayImageResolution 72
/MonoImageDownsampleType /Average
/MonoImageResolution 300
/NeverEmbed [/Courier /Courier-Bold /Courier-Oblique /Courier-BoldOblique /Helvetica /Helvetica-Bold /Helvetica-Oblique /Helvetica-BoldOblique /Times-Roman /Times-Bold /Times-Italic /Times-BoldItalic /Symbol /ZapfDingbats]
/PreserveEPSInfo false
/PreserveOPIComments false
/PreserveOverprintSettings false
/UCRandBGInfo /Remove
The same you can do for all the (other) parameters -dPDFSETTINGS=...
can take:
/prepress
/printer
/default
/screen
/ebook
/PSL2Printer
It's quite interesting to compare the detailed settings of all these (and also look up in parallel the Documentation for Ps2pdf.htm...).
Solution 3
This is a good document for new users:
http://www.ghostscript.com/doc/9.05/Use.htm
Solution 4
I found the following:
ps2pdf
:
"Screen Optimized" "eBook" "Print Optimized" "Prepress Optimized"
Acrobat 'Save as Adobe PDF' printer dialog
:
"Press Quality" "High Quality Print" "Smallest File Size" "Standard"
Press Quality
Creates PDF files for high-quality print production (for example, for digital printing or for color separations to an imagesetter or platesetter). However, it does not create files that are PDF/X compliant. In this case, the quality of the content is the highest consideration. The objective is to maintain all the information in a PDF file that a commercial printer or print service provider requires to print the document correctly. This set of options uses PDF 1.4, converts colors to CMYK, and downsamples color and grayscale images to 300 ppi and monochrome images to 1200 ppi. It embeds subsets of all fonts and preserves transparency (for file types capable of transparency).
High Quality Print
Creates PDFs for quality printing on desktop printers and proofing devices. This preset uses PDF 1.4, downsamples color and grayscale images to 300 ppi and monochrome images to 1200 ppi. It also embeds subsets of all fonts, leaves color unchanged, and does not flatten transparency (for file types capable of transparency).
Smallest File Size
Creates PDF files for displaying on the web or an intranet, or for distribution through an email system. This set of options uses compression, downsampling, and a relatively low image resolution. It converts all colors to sRGB, and (for Adobe Acrobat Distiller-based conversions) does not embed fonts. It also optimizes files for byte serving.
Standard
Creates PDF files to be printed to desktop printers or digital copiers, published on a CD, or sent to a client as a publishing proof. This set of options uses compression and downsampling to keep the file size down. However, it also embeds subsets of all (allowed) fonts used in the file, converts all colors to sRGB, and prints to a medium resolution. Windows font subsets are not embedded by default.
There's no exact correlation with the ps2pdf
PDFSETTINGS
but it at least gives an idea of the differences in preset qualities.
Related videos on Youtube
tetram
Updated on September 18, 2022Comments
-
tetram over 1 year
I know there is a Ghostscript option, for instance
-dPDFSETTINGS=/screen
- where is that documented? How can I see what other options it accepts, appart fromscreen
? Also,-dMaxSubsetPct=100
- what does it do?I open
man gs
, search forPDFSET
, I get "Pattern not found". I type in a search engine, I get a myriad of personal webpages, no documentation hits.Can anyone help with a link?
EDIT: also see this related post:
... for getting a list of supported options for a given device.
-
tetram almost 12 yearsMany thanks for that, @nwhsvc - it looks like indeed a very good document (just gave it a quick browse), but again, it doesn't mention neither "-dPDFSETTINGS" nor "-dMaxSubsetPct", let alone explain what they do. Is there a reference that explains these? Cheers!
-
tetram almost 12 yearsMany thanks for that @Bavi_H - so I should have looked for
ps2pdf
instead! Well, that didn't really occur to me, so I appreciate the pointer:)
Cheers! -
wolfhammer almost 5 yearsSuppose I want to tweak one of the parameters within the
screen
settings. How would I pass all these commands on the command line togs
? -
wolfhammer almost 5 yearslinks are deadd
-
Kurt Pfeifle almost 5 years@AlecJacobson: To answer your question you'd have to name which parameter you'd want to tweak.
-
wolfhammer almost 5 yearsI'm basically look for the answer to this (unanswered) question on SO stackoverflow.com/questions/54289570/…
-
Kurt Pfeifle almost 5 years@AlecJacobson: This doesn't help me quickly grasp what your problem is. (I'm available for hiring by the hour, should that help you, though...)
-
Socowi about 4 yearsThe link is dead.
-
Marcus about 2 yearsIt should be noted that, according to the Ghostscript manual, the best quality is obtained by not specifying PDFSETTINGS; see here.
-
Ax_ about 2 yearsCurrent doc