The issue when converting a PDF to true grayscale. At the (change shape SVG after processing through ghostscript command of. 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. ?id= Bug ID: Summary: Command line print in silent producing grayscale output.

Author: Mauzragore Dailrajas
Country: Morocco
Language: English (Spanish)
Genre: Life
Published (Last): 23 March 2007
Pages: 100
PDF File Size: 4.81 Mb
ePub File Size: 6.56 Mb
ISBN: 557-1-73071-238-6
Downloads: 60351
Price: Free* [*Free Regsitration Required]
Uploader: Goltikora

GS does the magic that corel and cs5 denied to me due to a obscure “host application error.

bash – How to convert a color pdf to black-white? – Unix & Linux Stack Exchange

Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies.

I tried using gs with the code listed hereand image quality is good with pdf text still there. I hope it is convenient for you! Sign up or log in Sign up using Google. I would have tried terdon’s solution, but I could not get pdftk on centOS 7 using yum at time of writing. The GEX Model – http: I imagine there is a more elegant solution.

The only thing that I had to change was the exe. For multiple pages, gs can merge multiple pdf files into one, but img2pdf yields smaller file size than gs. Stack Overflow works best with JavaScript enabled.


Sign up using Facebook. I wanted bw pdfs with good image quality and ghosstcript file size.

Making a PDF grayscale with ghostscript | handyfloss

Instead answer one question and flag the second one add duplicate. I have one PDF that reports gray, but I don’t know how to make ghostscript convert the other ones to be like it.

Reuben Thomas 4 8. I was eager to try this Google Knol. I tryed a lot of other things: One problem of running the first command: I am including the whole script here to avoid link rot:. My OS is Ubuntu Home Questions Tags Users Unanswered. Black pixels rather vectors should remain black and everything that is not purely black should disappear i.

And experiment with the threshold setting.

It requires gs which you seem to have but also pdftk. Your email address will not be published. Then conditionally load each one” http: To get text back in the bw pdf, run OCR again. Keep in mind for large numbers of pages, the intermediate bmp graayscale tiff files tend to be large in size.

Making a PDF grayscale with ghostscript

Caution when using some of the superuser approaches, they convert the PDF to a rasterized version, so it’s no longer vector graphics. Sign up using Facebook.

Now it works like a charm, thank you!! I would probably make monochrome versions of the pictures, graysacle name them consistently. Here is the full script pdf2bw. If I print out the ink converage it is using C, M, and Y to make gray. However, my method produces results with very good image quality graysclae much smaller file size.


I tried with Ghostscript: I am worrying about that. Don’t know if that will make your desired change possible or easy tho. Is that the entire script you ran? Home Questions Tags Users Unanswered. It will create a file called input-gray.

[gs-bugs] [Bug 697411] – Ghostscript – Command line print in silent producing grayscale output

It took about 20mins. Post as a guest Name. Tim horrible quality, not suited for OCR no matter what you do. You can find RPMs for it here. Since convert uses a resolution of 75DPI by default, which might not match grwyscale actual resolution, you can provide the density argument.

This command let you remove the white spaces around the picture introduced with the previous command: Graysxale still haven’t found a way to convert that file to grayscale without resorting to manual, single-image conversion.

Following the answers to this post I get the following script: My shell script uses gs, convert, and img2pdf. I tried going directly to tiff from the pdf but the quality is not the same so I save each page to bmp. BowPark 1, 8 25 The tiff files must be uncompressed as input to img2pdf. Super User works best with JavaScript enabled. I searched for such a solution for a hhostscript time: Best way I found out there, without grascale loss, removes shadows, noise, text from the next page bleeding through etc:.