tecnickcom / tc-lib-pdf-page
PHP library containing PDF page formats and definitions
Fund package maintenance!
Requires
- php: >=8.1
- ext-date: *
- ext-zlib: *
- tecnickcom/tc-lib-color: ^2.3
- tecnickcom/tc-lib-pdf-encrypt: ^2.1
Requires (Dev)
- pdepend/pdepend: ^2.16
- phpcompatibility/php-compatibility: ^10.0.0@dev
- phpmd/phpmd: ^2.15
- phpunit/phpunit: ^13.1 || ^12.5 || ^11.5 || ^10.5
- squizlabs/php_codesniffer: ^4.0
- dev-main
- 4.3.18
- 4.3.17
- 4.3.15
- 4.3.14
- 4.3.13
- 4.3.11
- 4.3.10
- 4.3.9
- 4.3.8
- 4.3.7
- 4.3.6
- 4.3.5
- 4.3.4
- 4.3.3
- 4.3.2
- 4.2.19
- 4.2.18
- 4.2.17
- 4.2.16
- 4.2.15
- 4.2.14
- 4.2.12
- 4.2.11
- 4.2.10
- 4.2.9
- 4.2.7
- 4.2.6
- 4.2.5
- 4.2.4
- 4.2.3
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.1
- 4.1.0
- 4.0.11
- 4.0.10
- 4.0.9
- 4.0.8
- 4.0.7
- 4.0.5
- 4.0.4
- 4.0.3
- 3.2.11
- 3.2.10
- 3.2.9
- 3.2.7
- 3.2.6
- 3.2.5
- 3.2.4
- 3.2.3
- 3.2.1
- 3.2.0
- 3.1.10
- 3.1.9
- 3.1.8
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.5.13
- 2.5.12
- 2.5.11
- 2.5.10
- 2.5.8
- 2.5.7
- 2.5.6
- 2.5.5
- 2.5.4
- 2.5.3
- 2.5.0
- 2.4.10
- 2.4.9
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.0
- 2.0.2
- 2.0.1
- 2.0.0
- 1.2.0
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.20
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
This package is auto-updated.
Last update: 2026-04-20 07:17:14 UTC
README
Page geometry, boxes, and format definitions for PDF documents.
If this library helps your layout engine, please consider supporting development via PayPal.
Overview
tc-lib-pdf-page manages page sizing, orientation, box definitions, and related geometry metadata.
It provides the structural model that document builders use to define media boxes, orientation changes, and page-level defaults consistently. Centralizing these rules improves correctness in multi-page layouts and simplifies downstream rendering code.
| Namespace | \Com\Tecnick\Pdf\Page |
| Author | Nicola Asuni info@tecnick.com |
| License | GNU LGPL v3 - see LICENSE |
| API docs | https://tcpdf.org/docs/srcdoc/tc-lib-pdf-page |
| Packagist | https://packagist.org/packages/tecnickcom/tc-lib-pdf-page |
Features
Page Model
- Standard and custom page size handling
- Orientation and unit conversion helpers
- Region and box definitions (CropBox, TrimBox, and related metadata)
Integration
- Supports PDF composition stacks that need deterministic page geometry
- Pairs with color/encryption libraries for complete page objects
- Typed exceptions for invalid layout parameters
Requirements
- PHP 8.1 or later
- Extensions:
date,zlib - Composer
Installation
composer require tecnickcom/tc-lib-pdf-page
Quick Start
<?php require_once __DIR__ . '/vendor/autoload.php'; $page = new \Com\Tecnick\Pdf\Page\Page( 'mm', new \Com\Tecnick\Color\Pdf(), new \Com\Tecnick\Pdf\Encrypt\Encrypt(false), false, false ); $dims = $page->setBox([], 'CropBox', 0, 0, 210, 297); var_dump($dims['CropBox']);
Development
make deps
make help
make qa
Packaging
make rpm make deb
For system packages, bootstrap with:
require_once '/usr/share/php/Com/Tecnick/Pdf/Page/autoload.php';
Contributing
Contributions are welcome. Please review CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.
Contact
Nicola Asuni - info@tecnick.com