leomage/php-pdfbox

v1.0.0 2019-04-16 07:24 UTC

This package is auto-updated.

Last update: 2024-04-17 00:02:52 UTC


README

PHP-PDFBox is a tiny lib which helps you to use PDFBox https://pdfbox.apache.org

PDFBox is published under the Apache License v2.0 and is described as "The Apache PDFBox® library is an open source Java tool for working with PDF documents."

Installation

It is recommended to install PHP-PDFBox through Composer :

{
    "require": {
        "leomage/php-pdfbox": "^1.0"
    }
}

Main API usage:

$file = new \Pdfbox\Processor\PdfFile(
    new Pdfbox(
        '/path/to/java',
        '/path/to/pdfbox-app.jar',
        new \Psr\Log\NullLogger()
    );
);

// Convert pdf to text
echo $file->toText('test.pdf');

See examples/*.php for more examples.

License

PHP-Pdfbox is released under MIT License http://opensource.org/licenses/MIT

See LICENSE file for more information