Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: PDF to JPG?

  1. #1
    New Coder
    Join Date
    Feb 2007
    Location
    Indianapolis, IN
    Posts
    35
    Thanks
    3
    Thanked 0 Times in 0 Posts

    PDF to JPG?

    Is it possible with PHP to read a PDF document on the server and create an on the fly thumbnail image of page 1, or any page within the PDF?

    Don't need help with code, only wondering if it is possible before I attempt it.

    Thanks!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Hmm well its possible to create a pdf file using php so I would imagine that its possible to open the pdf file and get what you need from it.
    http://www.zend.com/zend/spotlight/creatingpdfmay1.php
    If imagemagick is installed on your server then you can do it as well a little easier.
    http://studio.imagemagick.org/magick...pic.php?t=6203
    Last edited by _Aerospace_Eng_; 03-07-2007 at 01:04 AM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    You can use ImageMagick to convert PDFs to basically any image format(or vise versa).
    Last edited by Inigoesdr; 03-07-2007 at 01:54 AM.

  • #4
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,793
    Thanks
    19
    Thanked 156 Times in 147 Posts
    Quote Originally Posted by Inigoesdr View Post
    You can use ImageMagik to convert PDFs to basically any image format(or vise versa).
    That looks like a sweet API for PHP (http://www.magickwand.org/), but can it be used with your average commercial web hosting company server space?

    My guess is, unless you own and operate your own server, you won't have the opportunity to use this extension. And I doubt a commercial web hosting company would install it for you (they seem to shy away from such things).

    But it looks very nice otherwise.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Many hosts are already installing imagemagick by default. I did find this test suite that checks to see if imagemagick is installed or not. Its a cgi file but most servers have cgi-bins so...http://www.jmbsoft.com/software/tools/
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    New Coder
    Join Date
    Feb 2007
    Location
    Indianapolis, IN
    Posts
    35
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I looked up on the 1and1.com (my host) FAQ's and they do in fact support ImageMagick, but only on their Linux Hosting (not sure if this includes shared also, so I shot them an e-mail about it).

    I will definitely use that script to determine if I am able to do this on my host Aero, thanks a lot.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •