Page 1 of 1
PHP - upload a pdf file and display thumnails of all pages
Posted: Wed May 04, 2016 2:09 pm
by cjkeane
Hi.
I'm wondering if anyone knows of any way to upload a pdf file and display thumbnails of all of its pages ? Either that or upload a pdf and extract all pages as images.
i've been researching it and not sure how it can be done. thanks.
Re: PHP - upload a pdf file and display thumnails of all pag
Posted: Thu May 05, 2016 3:03 am
by thinsoldier
Wild guess here:
Upload a pdf file like you would any other file.
Have something like
https://pdfbox.apache.org/ installed on your server.
Somehow from php trigger pdfbox to read your uploaded pdf files and outpout image files to a folder in your site folder.
https://pdfbox.apache.org/2.0/commandli ... pdftoimage
Re: PHP - upload a pdf file and display thumnails of all pag
Posted: Thu May 05, 2016 3:03 pm
by Christopher
Well, the upload is the same as any other file -- so that's the easier part. There are several ways to either display a PDF (search for "javascript PDF viewers") or to generate image from it like PDF Box mentioned above. Depending on the server type, you may be able to print the PDF to images as well.
Re: PHP - upload a pdf file and display thumnails of all pag
Posted: Thu May 05, 2016 3:22 pm
by Celauran
Might also be worth looking at poppler utils.