Google Code Prettify

2012年7月2日 星期一

利用 Ghostscript 重新產生PDF


Ghostscript
http://pages.cs.wisc.edu/~ghost/


完整參數
http://www.ghostscript.com/doc/current/Use.htm


範例指令

 轉換為600dpi
 gswin32c -dNOPAUSE -dBATCH -q -r600 -sDEVICE=pdfwrite -sOutputFile=out.pdf input.pdf

指定頁數
gswin32c -dNOPAUSE -dBATCH -q -r600 -sDEVICE=pdfwrite -dFirstPage=22 -dLastPage=36 -sOutputFile=out.pdf input.pdf

pdfwrite Additional Options

PDF optimization level selection options
 -dPDFSETTINGS=/screen   (screen-view-only quality, 72 dpi images)
 -dPDFSETTINGS=/ebook    (low quality, 150 dpi images)
 -dPDFSETTINGS=/printer  (high quality, 300 dpi images)
 -dPDFSETTINGS=/prepress (high quality, color preserving, 300 dpi imgs)
 -dPDFSETTINGS=/default  (almost identical to /screen)


Paper size selection options
 -sPAPERSIZE=letter
 -sPAPERSIZE=a4
 -dDEVICEWIDTHPOINTS=w -dDEVICEHEIGHTPOINTS=h (point=1/72 of an inch)
 -dFIXEDMEDIA (force paper size over the PostScript defined size)

Other options
 -dEmbedAllFonts=true
 -dSubsetFonts=false
 -dFirstPage=pagenumber
 -dLastPage=pagenumber
 -dAutoRotatePages=/PageByPage
 -dAutoRotatePages=/All
 -dAutoRotatePages=/None
 -r1200 (resolution for pattern fills and fonts converted to bitmaps)
 -sPDFPassword=password
 -dConvertCMYKImagesToRGB=true
 -dCompatibilityLevel=1.5

更多參數請參考 Ps2pdf.htm

沒有留言: