Pdf to image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
DavideDavide
Posts: 4
Joined: 2015-03-06T08:39:54-07:00
Authentication code: 6789

Pdf to image

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Pdf to image

Post 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?
snibgo's IM pages: im.snibgo.com
DavideDavide
Posts: 4
Joined: 2015-03-06T08:39:54-07:00
Authentication code: 6789

Re: Pdf to image

Post by DavideDavide »

Hi,
Unfortunately the non reduced version is too large to put it in a sidebar
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Pdf to image

Post 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.
snibgo's IM pages: im.snibgo.com
DavideDavide
Posts: 4
Joined: 2015-03-06T08:39:54-07:00
Authentication code: 6789

Re: Pdf to image

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Pdf to image

Post 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.
snibgo's IM pages: im.snibgo.com
DavideDavide
Posts: 4
Joined: 2015-03-06T08:39:54-07:00
Authentication code: 6789

Re: Pdf to image

Post 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?
Post Reply