Download the PHP package guillaumepotier/pdfxtractor without Composer
On this page you can find all versions of the php package guillaumepotier/pdfxtractor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download guillaumepotier/pdfxtractor
More information about guillaumepotier/pdfxtractor
Files in guillaumepotier/pdfxtractor
Package pdfxtractor
Short Description Convert PDFs to JPEG images like a charm!
License GPL
Informations about the package pdfxtractor
PdfXtractor
PdfXtractor is a PHP class that relies on GhostScript. This is a handy wrapper that allows PDF conversion to JPEG files.
Installation
The recommended way to install PdfXtractor is through composer.
Just create a composer.json
file for your project:
And run these two commands to install it:
Now you can add the autoloader, and you will have access to the library:
If you don't use neither Composer nor a ClassLoader in your application, just require the provided autoloader:
Be sure to give permissions to the GhostScript binary you'll use:
You're done!
Usage
You'll just need to specify the pdf you want to convert, where you want to dump the .jpg files generated and under which name:
Unit Tests
To run unit tests, set your proper phpunit.xml file by doing:
Set the GS_BIN
you'll use in your environement. Save and launch then the following
command:
TODO
Need to better rationalize the GhostScript binary used in function of the user OS. Maybe integrate a shell script to build gs properly for the user os, because the 3 gs bin provided here are a little heavy (~100Mb) and still no better than a proper build.
Credits
Guillaume Potier. @guillaumepotier
License
PdfXtractor is released under the MIT License for the PHP Wrapper. Unfortunately, GhostScript is under GPL license. Which makes this whole project under GPL license. See the bundled LICENSE file for more details.