Re: [PHP] Can GD make a JPG thumbnail of a PDF?
If system(convert -version) does nothing, it is probably erroring out. Mess around with exec and using 21 to try to get the error message. It's going to boil down to paths and permissions. The PHP user probably doesn't have convert in $PATH. Use a FULL PATH for system/exec calls for *any* path, and within *any* script being called. Anything else is just a time bomb waiting to blow up on you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can GD make a JPG thumbnail of a PDF?
It looks like there is something wrong with your newsreader because your replies are not being connected to what you are replying to. Have you noticed? Much harder for everyone. What newsreader are you using? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can GD make a JPG thumbnail of a PDF?
I've spent most of the last week trying to get ImageMagick working on my Windows PHP installation. I gather that since I'm going to be converting PDFs to JPEGs, I need Ghostscript. Well, I've got ImageMagick installed: http://printhq2.com/info.php I ran a Ghostscript installer, but it didn't seem to do very much. Some site advised me to test my installation like this: ?php echo pre; system(convert -version); echo /pre; ? But it just returns blank. Can anyone help me get ImageMagick working on my server? On Nov 20, 2008, at 4:41 PM, Stephen Johnson wrote: No but you can use imagemagicks convert to convert the pdf to an image and then make a thumbnail of it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can GD make a JPG thumbnail of a PDF?
I think you want something like this : exec(convert -density 360x360 -enhance $pdfFile $pdfFile.gif); On 12/10/08 4:48 PM, Brian Dunning [EMAIL PROTECTED] wrote: I've spent most of the last week trying to get ImageMagick working on my Windows PHP installation. I gather that since I'm going to be converting PDFs to JPEGs, I need Ghostscript. Well, I've got ImageMagick installed: http://printhq2.com/info.php I ran a Ghostscript installer, but it didn't seem to do very much. Some site advised me to test my installation like this: ?php echo pre; system(convert -version); echo /pre; ? But it just returns blank. Can anyone help me get ImageMagick working on my server? On Nov 20, 2008, at 4:41 PM, Stephen Johnson wrote: No but you can use imagemagicks convert to convert the pdf to an image and then make a thumbnail of it. -- Stephen Johnson The Lone Coder http://www.ouradoptionblog.com *Join us on our adoption journey* [EMAIL PROTECTED] http://www.thelonecoder.com *Continuing the struggle against bad code* -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can GD make a JPG thumbnail of a PDF?
On Thu, Dec 11, 2008 at 1:59 PM, Stephen Johnson [EMAIL PROTECTED] wrote: I think you want something like this : exec(convert -density 360x360 -enhance $pdfFile $pdfFile.gif); Yes, that's how i did it here. Didn't find a better solution yet. Was looking at the php module for imagemagick (imagick i believe), but that seemed not quite there yet for deployment. Please advise if someone got that working. Would prefer this over a shellexecute. You will need to install imagemagick and i believe you also need ghostscript for this to work. You can get both for linux and windows, free. On debian and ubuntu and such: apt-get install imagemagick gs On 12/10/08 4:48 PM, Brian Dunning [EMAIL PROTECTED] wrote: I've spent most of the last week trying to get ImageMagick working on my Windows PHP installation. I gather that since I'm going to be converting PDFs to JPEGs, I need Ghostscript. Well, I've got ImageMagick installed: http://printhq2.com/info.php I ran a Ghostscript installer, but it didn't seem to do very much. Some site advised me to test my installation like this: ?php echo pre; system(convert -version); echo /pre; ? But it just returns blank. Can anyone help me get ImageMagick working on my server? On Nov 20, 2008, at 4:41 PM, Stephen Johnson wrote: No but you can use imagemagicks convert to convert the pdf to an image and then make a thumbnail of it. -- Stephen Johnson The Lone Coder http://www.ouradoptionblog.com *Join us on our adoption journey* [EMAIL PROTECTED] http://www.thelonecoder.com *Continuing the struggle against bad code* -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Tim-Hinnerk Heuer http://www.ihostnz.com
Re: [PHP] Can GD make a JPG thumbnail of a PDF?
On Thu, Dec 11, 2008 at 1:59 PM, Stephen Johnson [EMAIL PROTECTED] wrote: I think you want something like this : exec(convert -density 360x360 -enhance $pdfFile $pdfFile.gif); Yes, that's how i did it here. Didn't find a better solution yet. Was looking at the php module for imagemagick (imagick i believe), but that seemed not quite there yet for deployment. Please advise if someone got that working. Would prefer this over a shellexecute. You will need to install imagemagick and i believe you also need ghostscript for this to work. You can get both for linux and windows, free. On debian and ubuntu and such: apt-get install imagemagick gs On 12/10/08 4:48 PM, Brian Dunning [EMAIL PROTECTED] wrote: I've spent most of the last week trying to get ImageMagick working on my Windows PHP installation. I gather that since I'm going to be converting PDFs to JPEGs, I need Ghostscript. Well, I've got ImageMagick installed: http://printhq2.com/info.php I ran a Ghostscript installer, but it didn't seem to do very much. Some site advised me to test my installation like this: ?php echo pre; system(convert -version); echo /pre; ? But it just returns blank. Can anyone help me get ImageMagick working on my server? On Nov 20, 2008, at 4:41 PM, Stephen Johnson wrote: No but you can use imagemagicks convert to convert the pdf to an image and then make a thumbnail of it. -- Stephen Johnson The Lone Coder http://www.ouradoptionblog.com *Join us on our adoption journey* [EMAIL PROTECTED] http://www.thelonecoder.com *Continuing the struggle against bad code* -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Tim-Hinnerk Heuer http://www.ihostnz.com
Re: [PHP] Can GD make a JPG thumbnail of a PDF?
No but you can use imagemagicks convert to convert the pdf to an image and then make a thumbnail of it. On 11/20/08 4:39 PM, Brian Dunning [EMAIL PROTECTED] wrote: Well can it? -- Stephen Johnson The Lone Coder http://www.ouradoptionblog.com *Join us on our adoption journey* [EMAIL PROTECTED] http://www.thelonecoder.com *Continuing the struggle against bad code* -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php