- Notifications
You must be signed in to change notification settings - Fork553
PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.
License
smalot/pdfparser
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Thesmalot/pdfparser
is a standalone PHP package that provides various tools to extract data from PDF files.
This library is underactive maintenance.There is no active development by the author of this library (at the moment), but we welcome any pull request adding/extending functionality!SeeCONTRIBUTING.md for further information about how to contribute.
- Load/parse objects and headers
- Extract metadata (author, description, ...)
- Extract text from ordered pages
- Support of compressed PDFs
- Support of MAC OS Roman charset encoding
- Handling of hexa and octal encoding in text sections
- Create custom configurations (seeCustomConfig.md).
Currently, secured documents and extracting form data are not supported.
This library is under theLGPLv3 license.
This library requires PHP 7.1+ sincev1.You can install it viaComposer:
composer require smalot/pdfparser
In case you can't use Composer, you can includealt_autoload.php-dist
. It will include all required files automatically.
<?php// Parse PDF file and build necessary objects.$parser =new \Smalot\PdfParser\Parser();$pdf =$parser->parseFile('/path/to/document.pdf');$text =$pdf->getText();echo$text;
Further usage information can be foundhere.
Documentation can be found in thedoc folder.
About
PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.