[PHP] Re: What method is best for generating thumbnails in PHP from PDF's?

2009-11-12 Thread O. Lavell
Chris Payne wrote:

 Hi Everyone,
 
 I have been asked to create thumbnails from the first page of a PDF
 document on the fly with PHP, I have looked online but am confused as
 there doesn't seem 1 simple solution.
 
 What would you all recommend as an easy way to do this?
 
 Any help would be really appreciated.

I think I would just call an external program to do it, like convert 
from Image Magick:

exec(convert -thumbnail 300x300 document001.pdf[0] thumbnail001.png);


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: What method is best for generating thumbnails in PHP from PDF's?

2009-11-12 Thread Joseph Masoud

 On 12/11/09 17:44, O. Lavell wrote:

Chris Payne wrote:


Hi Everyone,

I have been asked to create thumbnails from the first page of a PDF
document on the fly with PHP, I have looked online but am confused as
there doesn't seem 1 simple solution.

What would you all recommend as an easy way to do this?

Any help would be really appreciated.

I think I would just call an external program to do it, like convert
from Image Magick:

exec(convert -thumbnail 300x300 document001.pdf[0] thumbnail001.png);


If you're going to use ImageMagick, make sure you have the latest 
ghostscript library, otherwise not all thumbnails will render properly.


I don't recommend CentOS for this task.  If this is your server OS, I 
recommend considering this rpm:


http://www.clearfield.com/ghostscript.8.64/ghostscript.html

Good luck.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php