How to convert a PDF to grayscale from command line avoiding to be rasterized?

后端 未结 7 1017
暖寄归人
暖寄归人 2020-12-14 08:51

I\'m trying to convert to grayscale this PDF: https://dl.dropboxusercontent.com/u/10351891/page-27.pdf

Ghostscript (v 9.10) with pdfwrite Device fails with a \"Unabl

7条回答
  •  余生分开走
    2020-12-14 09:22

    A bit late in the day, but the top answer doesn't work for me with a different file. The underlying problem appears to be old code in Ghostscript, for which there is a later version that is not enabled by default. More on that here: http://bugs.ghostscript.com/show_bug.cgi?id=694608

    The page above also gives a command that works for me:

    gs \
      -sDEVICE=pdfwrite \
      -dProcessColorModel=/DeviceGray \
      -dColorConversionStrategy=/Gray \
      -dPDFUseOldCMS=false \
      -o out.pdf \
      -f in.pdf
    

提交回复
热议问题