Composer PHP handler for pdfgrep

1.0.0 2020-04-04 19:51 UTC

This package is auto-updated.

Last update: 2024-04-05 08:37:49 UTC


README

Run tests

A simple package for reading information via full text search with pdfgrep and using the information in a PHP script.

Installing / Getting started

First add bureaupartners/pdfgrep to your composer.json

composer require bureaupartners/pdfgrep

Then add the following code to your project

use BureauPartners\pdfgrep\pdfgrep;

$pdfgrep = new pdfgrep('Document.pdf', 'Dog');
$pdfgrep->getFirstMatch(); // Returns first match in the document
$pdfgrep->getMatches(); // Returns all the matches
$pdfgrep->getPageNumbers(); // Returns all page numbers with a match

Dependencies

Requires an installation of pdfgrep on the server.

You can install it for example like this:

apt-get install -y poppler-utils
apt-get install -y pdfgrep

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Links

Licensing

The code in this project is licensed under MIT license.