How to downsample images within PDF file?

前端 未结 4 1107
無奈伤痛
無奈伤痛 2020-12-12 19:48

Need a Java-based solution or, at the worst, command-line for Linux.

I tried to use Ghostscript:

gs -sDEVICE=pdfwrite -dPDFA -dBATCH -dNOPAUSE -dUseC         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-12 20:08

    This is what I am using:

    gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=OUTPUT.pdf INPUT.pdf

    For your reference:

    -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)

提交回复
热议问题