Download the PHP package datacodetech/pdf-stream-decode without Composer
On this page you can find all versions of the php package datacodetech/pdf-stream-decode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download datacodetech/pdf-stream-decode
More information about datacodetech/pdf-stream-decode
Files in datacodetech/pdf-stream-decode
Download datacodetech/pdf-stream-decode
More information about datacodetech/pdf-stream-decode
Files in datacodetech/pdf-stream-decode
Vendor datacodetech
Package pdf-stream-decode
Short Description PHP library to decode data from PDF stream objects
License MIT
Package pdf-stream-decode
Short Description PHP library to decode data from PDF stream objects
License MIT
Please rate this library. Is it a good library?
Informations about the package pdf-stream-decode
PDF Stream Decode
PHP library to decode the data in PDF stream objects.
Installation
Include with composer by adding
{
"require": {
"datacodetech/pdf-stream-decode": "^1.0.0"
}
}
Usage
This has been designed to work with pdfparser although any source can be used if the input is in the same format - the data from the PDF object header as an assoc array.
<?php
use Smalot\PdfParser\Parser;
use datacode\pdfStreamDecode\stream;
$parser = new Parser();
$document = $parser->parseContent(file_get_contents('pdf_file.pdf'));
$page = $document->getPages()[0];
$object = $page->getXObjects()[0];
$object_details = $object->getDetails();
$object_data = $object->getContent();
$decoded_data = (new stream($object_details, $object_data))->decode();
$object_details
may also be constructed manually if pdfparser is not used
<?php
$object_details = [
'Filter' => 'FlateDecode',
'Length' => 12349,
];
All versions of pdf-stream-decode with dependencies
PHP Build Version
Package Version
The package datacodetech/pdf-stream-decode contains the following files
Loading the files please wait ....