tecnickcom/tc-lib-pdf-page
Manages page sizes, orientation, and box definitions (MediaBox, CropBox, TrimBox) for PDF documents. Part of the tc-lib-pdf/TCPDF ecosystem, it provides deterministic page geometry and unit conversion helpers for multi-page layouts.
Page geometry, boxes, and format definitions for PDF documents.
💖 Part of the tc-lib-pdf / TCPDF ecosystem (100M+ installs). Sponsor its maintenance →
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 [email protected] |
| 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 |
zlibcomposer require tecnickcom/tc-lib-pdf-page
<?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']);
make deps
make help
make qa
make rpm
make deb
For system packages, bootstrap with:
require_once '/usr/share/php/Com/Tecnick/Pdf/Page/autoload.php';
Contributions are welcome. Please review CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.
How can I help you explore Laravel packages today?