>>So, first, can PDFBox generate the image file via code on my client's
site?

The PDF is on the server, right?  The PDFBox can be installed on the server
and run there to convert the PDF (or any of its pages) to an image.  JPG's
and PNG's are certainly available ...

>>Second, if possible, how do I do it?
Some example code is in
src/main/java/org/apache/pdfbox/util/PDFImageWriter.java as well as
src/test/org/apache/pdfbox/util/TestPDFToImage.java

The former actually compiles to an executable you can call from the command
line.

Now ... how best do you call Java from PHP?  I don't know ... hoping someone
who does will weigh in on that.

On Sun, Aug 30, 2009 at 5:17 AM, Mark W <expa...@gmail.com> wrote:

> First off, I am a total Java greenhorn...Not even sure PDFBox can do what I
> need it to do.
>
> What I am needing is for a client's web site to be able to create an image
> of the first page of a PDF document which I can then use as a thumbnail
> link
> on their site...I tried already to just ImageMagick but my hosting site
> does
> not have GhostScript installed, so the PDF libraries are not available to
> ImageMagick.
>
> So, first, can PDFBox generate the image file via code on my client's site?
> I don't want my client to have to install or run anything local to their
> computer, I want it all to be server side (which of course means I only
> have
> access to folders within my domain - as far as containing new files/code).
>
> Second, if possible, how do I do it?  I am really green with Java and am
> much more comfortable with PHP and mySQL -- this is new to me but am
> willing
> to learn but cannot find enough (idiot) level documentation to help me out.
>
> Thanks in advance.
>
> Mark
>

Reply via email to