yvan
yvan

Reputation: 958

How to convert PDF to an Image without text

I would like to know if its possible to convert a PDF to and image without fonts. My goal is to have only the image without text ?

And if yes, can I do it with ImageMagick/GhostScript ?

Here an example

The image final http://crocodoc_public.s3.amazonaws.com/8b8aa154-45e3-41f9-a465-628e1b2e955d/images/page-001.png

and the original PDF http://crocodoc.com/demo/efwpa (page 2) We can see that the text are on overlay over the image, what I want is to do the same.

Upvotes: 6

Views: 2584

Answers (3)

hussainb
hussainb

Reputation: 1296

I too am the lookout for something like that. While playing with imagemagick I tried this a command and got some unexpected results.

convert -input.pdf -blur 0x0 output.jpg

this removes the text layers from the pdfs I tried.

I cannot guarantee that this will work for you and if this the right way to achieve, but you may try.

Upvotes: 1

Doc Brown
Doc Brown

Reputation: 20054

So if I got you right, what you want is to remove some text from your PDF (not fonts), and you want to do it programmatically. I suspect you know already that this will only possible if the text is placed on some kind of separate layer in your PDF files. You can try to utilize iText for that. Beware, this will mean you will have to invest some days of learning how to use that library.

Upvotes: 1

topskip
topskip

Reputation: 17375

You can do that with Adobe Acrobat. Select the text with the touch up tool and delete it. I don't think you can do that with Ghostscript. You could consider editing the PDF by hand (qpdf helps).

Upvotes: 0

Related Questions