homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Convert PDF document to image file
PHP, Imagemagick, PDF

 8:23 am on Jan 16, 2013 (gmt 0)

Good morning world,

I need to convert a PDF document to an image file. I have ImageMagick and convert-function which partly solves my problem.
Specifically, I need to get converted into a PDF document to an image file, so the aspect ratio is 1:1. This means that if I open the PDF document in a browser (eg. Chrome and with 100% zoom) and open the image file, so they must be completely identical.
It has not managed to find the right "recipe" yet.

I hope there is a kind soul who can help me.




 9:29 am on Jan 16, 2013 (gmt 0)

You're asking for orange flavored apples I'm afraid.

PDF contains pages of a certain size (A4, US, ...) intended to be printed - but they can be previewed on a a screen as well. PDFs contains essentially vector information (they can contain images as well in various resolutions). You can zoom in and out of pdf files at will, and you need to zoom in extremely deep to see the "resolution" of any well made file (images in the file will show their resolution first, but fonts, lines etc will not do so easily.

images are about pixels.

If you want both to be the same "size" well you need to first define the size of the pdf and having it as "full screen" just isn't going to work everywhere as it'll depend on the size of the specific screen.


 9:44 am on Jan 16, 2013 (gmt 0)

Aw, it was not exactly the answer I expected ;-)

My problem is that I need a draggable DIV into a PDF document. When this DIV released, I get top / left coordinates. The coordinates will be used to make a similar box/border/square in the same PDF document, with for example FPDF.

So I thought that if I could make draggable DIV on the image file size 1:1, so I had solved the problem. But when I can not make the image file 1:1, so I have a new problem. Damn.


 3:05 pm on Jan 16, 2013 (gmt 0)

From what I understand you're trying to make a system to paste a pdf page into / on top of an existing pdf document ?

Both the pdf documents have sizes in them. But don't you need to give users a way to scale what you paste ?


 8:44 am on Jan 17, 2013 (gmt 0)

I have an existing PDF document.
Users must be able to insert a frame / box (with text inside) on top of the existing PDF document.
I can insert box in the PDF document. But my problem is that I can not make a system so that users can decide (using the mouse) where the box will be placed.

That's why I began to think in other terms, in terms of having an image where users with a draggable DIV can specify the location of the PDF document. The image file should of course reflect PDF 1:1.

Do you understand my problem?


 2:24 pm on Jan 22, 2013 (gmt 0)

In case you need other type of PDF conversions, I warmly suggest this website: http://kitpdf.com/. It exports web pages onto PDF files and also convert from PDF to text, mobi or epub for your ebook readers. Enjoy.

[edited by: coopster at 8:16 pm (utc) on Jan 24, 2013]
[edit reason] delinked url [/edit]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved