PHP code example of mjohann / paginated-file-reader
1. Go to this page and download the library: Download mjohann/paginated-file-reader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mjohann / paginated-file-reader example snippets
hann\Packlib\PaginatedFileReader;
$reader = new PaginatedFileReader('path/to/your/file.pdf');
// Read page 0
echo $reader->readPage(0);
// Get total pages
echo $reader->getTotalPages();
project/
├── src/
│ ├── Interfaces/
│ │ └── PaginatedFileReaderInterface.php
│ ├── Readers/
│ │ ├── TextFileReader.php
│ │ ├── PdfFileReader.php
│ │ ├── DocxFileReader.php
│ │ └── OdtFileReader.php
│ └── PaginatedFileReader.php
├── example/
│ └── script.php
├── composer.json
├── .gitignore
├── LICENSE
└── README.md