PHPackages                             mjohann/paginated-file-reader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mjohann/paginated-file-reader

ActiveLibrary

mjohann/paginated-file-reader
=============================

A PHP library to read files page by page, supporting multiple formats like TXT, PDF, DOCX, and ODT. Each file type is handled by a dedicated reader class, all following a unified interface for seamless integration.

v1.0.0(1y ago)046↓100%MITPHPPHP ^8.0

Since Apr 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/matheusjohannaraujo/paginated-file-reader)[ Packagist](https://packagist.org/packages/mjohann/paginated-file-reader)[ RSS](/packages/mjohann-paginated-file-reader/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

[📄 Paginated File Reader](https://github.com/matheusjohannaraujo/paginated_file_reader)
=======================================================================================

[](#-paginated-file-reader)

A PHP library to read files page by page, supporting multiple formats like **TXT**, **PDF**, **DOCX**, and **ODT**. Each file type is handled by a dedicated reader class, all following a unified interface for seamless integration.

📦 Installation
--------------

[](#-installation)

You can install the library via Composer:

```
composer require mjohann/paginated-file-reader
```

⚙️ Requirements
---------------

[](#️-requirements)

- PHP 8.0 or higher

🚀 Features
----------

[](#-features)

- Read files page by page (pagination logic varies by file type)
- Supported formats:
    - `.txt` and `.md` (50 lines per page)
    - `.pdf` (using `smalot/pdfparser`)
    - `.docx` (using `phpoffice/phpword`)
    - `.odt` (using native `ZipArchive`)
- Easily extendable for other file types
- Unified interface for all readers

🧪 Usage Example
---------------

[](#-usage-example)

```
