Page 1 of 1

Pdf to image

Posted: 2015-03-06T08:56:56-07:00
by DavideDavide
Hi Folks!
I have a pdf that represents a column of text of a colleague of mine: job title, contact details, address and so on
I put a blurred version here http://imgur.com/SQWMCmI (privacy concerns)

I need to convert the pdf to an image and put it as a sidebar on the left of a web page, then I need to print the whole page.

I convert the pdf to a png and I can preserve the quality, but if I reduce it to put as a sidebar of the webpage and print it, fonts are not sharp. I think it's a scaling issue but I don't know how to solve it.

Can you help me please?
TIA
Davide

Re: Pdf to image

Posted: 2015-03-06T09:07:26-07:00
by snibgo
I don't understand the problem. If you print the reduced version, it won't be sharp. Can't you print the non-reduced version?

Re: Pdf to image

Posted: 2015-03-06T09:11:34-07:00
by DavideDavide
Hi,
Unfortunately the non reduced version is too large to put it in a sidebar

Re: Pdf to image

Posted: 2015-03-06T10:50:57-07:00
by snibgo
I think your problem is about designing web pages.

ImageMagick processes images. It can read a PDF and make raster images of them, at various sizes, showing more or less detail. Which ones you choose to put on a web page, or print, is up to you.

Re: Pdf to image

Posted: 2015-03-06T11:53:55-07:00
by DavideDavide
No, it's not the webpage. I can easily manage the image in my web page. The issue is to convert pdf text to a defined image of a properly dimension.
How can I resize the pdf (or the resulting image) preserving a detailed text i.e. no blur, no noise?

Re: Pdf to image

Posted: 2015-03-06T12:22:05-07:00
by snibgo
This command ...

Code: Select all

convert -density XX in.pdf out.png
... where XX is some number, like 300 or 2400, will make a PNG at whatever density (DPI) you specify. If the PDF contained vector text, you will be able to read it in the PNG, provided your XX is sufficiently large.

You can resize before writing the PNG, or convert it to another PNG that is resized, or whatever. Reducing the size of text will reduce the legibility.

It's hard to be specific without seeing your current commands, input or output.

Re: Pdf to image

Posted: 2015-03-06T12:31:47-07:00
by DavideDavide
Thanks snibgo, it's the command I use, with density of 600.
I converted to png then resize it and text is blurry, not so much but it is.

I can try to reduce the pdf then convert to png. Is there a imagemagick command to reduce pdfs?