I’m creating pdf's for a RIP-engine. Sometimes I have to convert all fonts to outlines and maybe 1/1000 of those pdfs will get stuck while ripping. For the conversion to outlines I use:
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dNoOutputFonts -sOutputFile outlined_output.pdf input.pdf
When this occures, I previously just opened the pdf in Acrobat and used PitStop to convert to outlines instead, since I thought that the problem was with Ghostscript's way of outlining.
Now, I’ve noticed that if I just open the very same pdf that get stuck while ripping in Acrobat 9 Standard and save it to another location, it will rip just fine.
I then tried a bunch of gs-commands and found out that if I use -dPDFSETTINGS=/screen or /ebook it would rip ok, but not when using /printer or /prepress. For quality reasons, /screen and /ebook is not ok.
I tried to understand what differs from ebook and printer.
/ebook
gs -q -dNODISPLAY -c ".distillersettings /ebook get {exch ==only ( ) print ===} forall quit" | sort
Gives:
/AutoRotatePages /All
/CannotEmbedFontPolicy /Warning
/ColorACSImageDict << /Blend 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2] /QFactor 0.76 /ColorTransform 1 >>
/ColorConversionStrategy /sRGB
/ColorImageDownsampleType /Average
/ColorImageResolution 150
/CompatibilityLevel 1.5
/CreateJobTicket false
/DoThumbnails false
/EmbedAllFonts true
/GrayACSImageDict << /Blend 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2] /QFactor 0.76 /ColorTransform 1 >>
/GrayImageDownsampleType /Average
/GrayImageResolution 150
/MonoImageDownsampleType /Subsample
/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
And /printer
gs -q -dNODISPLAY -c ".distillersettings /ebook get {exch ==only ( ) print ===} forall quit" | sort
Gives:
/AutoRotatePages /None
/CannotEmbedFontPolicy /Warning
/ColorACSImageDict << /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] /QFactor 0.4 /ColorTransform 1 >>
/ColorConversionStrategy /UseDeviceIndependentColor
/ColorImageDownsampleType /Average
/ColorImageResolution 300
/CompatibilityLevel 1.7
/CreateJobTicket true
/DoThumbnails false
/EmbedAllFonts true
/GrayACSImageDict << /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] /QFactor 0.4 /ColorTransform 1 >>
/GrayImageDownsampleType /Average
/GrayImageResolution 300
/MonoImageDownsampleType /Subsample
/MonoImageResolution 1200
/NeverEmbed []
/PreserveEPSInfo true
/PreserveOPIComments true
/PreserveOverprintSettings true
/UCRandBGInfo /Preserve
Now, I was thinking if I could take the /ebook settings into command-line arguments and adjust or remove one by one until I find the correct command that makes the pdf rip fine. As I can read from examples on the web, -dAutoRotatePages=/None is a correct argument. Adding "-d" together with "=" looks to be correct? Also, NeverEmbed, ColorACSImageDict and GrayACSImageDict must be called from "-c" (https://www.ghostscript.com/doc/9.22/VectorDevices.htm#note_13)
EDIT: new command based on KenS guidelines:
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite
-dAutoRotatePages=/All \
-dCannotEmbedFontPolicy=/Warning \
-dColorConversionStrategy=/sRGB \
-dColorImageDownsampleType=/Average \
-dColorImageResolution=150 \
-dCompatibilityLevel=1.5 \
-dCreateJobTicket=false \
-dDoThumbnails=false \
-dEmbedAllFonts=true \
-dGrayImageDownsampleType=/Average \
-dGrayImageResolution=150 \
-dMonoImageDownsampleType=/Subsample \
-dMonoImageResolution=300 \
-dPreserveEPSInfo=false \
-dPreserveOPIComments=false \
-dPreserveOverprintSettings=false \
-dUCRandBGInfo=/Remove \
-sOutputFile=final_output.pdf \
-c '<</ColorACSImageDict << /Blend 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2] /QFactor 0.76 /ColorTransform 1 >> <</GrayACSImageDict << /Blend 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2] /QFactor 0.76 /ColorTransform 1 >> <</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] >> setdistillerparams' \
-f outlined_output.pdf
This command produces a pdf that still gets stuck. So what am I doing wrong, is the formatting wrong somewhere? How should the arguments look like to be exactly like /ebook?
Anyone have direct suggestions on what the difference could be between /ebook and /printer that can cause the pdf to stuck at the rip?
Best Regards Niclas