익명 21:47

Convert a PDF to greyscale on the command line *without* bit rasterization

Convert a PDF to greyscale on the command line *without* bit rasterization

Strongly related to Convert a PDF to greyscale on the command line in FLOSS?

My go-to command has been

gs \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.3 \
-dPDFSETTINGS=/printer \
-dBATCH \
-dNOPAUSE \
-dQUIET \
-dPDFA \
-sProcessColorModel=DeviceGray \
-sColorConversionStrategy=Gray \
-dOverrideICC \
-sOutputFile=output-printer.pdf \
   $1

However, this increases the file size and reduces the print quality. In particular, text written in fonts turns into bitmaps.

What I really need is a program that takes a pdf file, replaces color commands with equivalent black-and-gray shades while removing all transparencies (to make the file pdf/a compatible). Rendering a pdf to a bit device for my purposes --- whether printer or ebook or screen --- seems like a fundamentally flawed approach. for this matter, using Acrobat Pro with its 6,236 GUI options also seems painful.

commercial or uncommercial, are there command line utilities that can do this?

barring this, are there configuration files for Acrobat Pro that can accomplish this for unsophisticated untrained users?



Top Answer/Comment:

Yes, pdftl can now do this:

pdftl color.pdf recolor_vectors --- recolor_images output gray.pdf

For more, see the recolor_vectors documentation and the recolor_images documentation.

Disclaimer: I am the pdftl developer

상단 광고의 [X] 버튼을 누르면 내용이 보입니다