Re: Can GD make a JPG thumbnail of a PDF?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 11, 2008 at 1:59 PM, Stephen Johnson <maillists@xxxxxxxxxxxxxxxx
> 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" <brian@xxxxxxxxxxxxxxxx> 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*
>
> stephen@xxxxxxxxxxxxxxxx
> 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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux