PHPackages                             tecnickcom/tc-lib-pdf-page - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. tecnickcom/tc-lib-pdf-page

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

tecnickcom/tc-lib-pdf-page
==========================

PHP library containing PDF page formats and definitions

4.13.1(1w ago)7720.2k↓18.2%41LGPL-3.0-or-laterPHPPHP &gt;=8.2CI passing

Since Jul 2Pushed 2w ago2 watchersCompare

[ Source](https://github.com/tecnickcom/tc-lib-pdf-page)[ Packagist](https://packagist.org/packages/tecnickcom/tc-lib-pdf-page)[ Docs](https://tcpdf.org)[ GitHub Sponsors](https://github.com/sponsors/tecnickcom)[ RSS](/packages/tecnickcom-tc-lib-pdf-page/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (21)Versions (137)Used By (1)

tc-lib-pdf-page
===============

[](#tc-lib-pdf-page)

> Page geometry, boxes, and format definitions for PDF documents.

[![Latest Stable Version](https://camo.githubusercontent.com/d1057b005129979832d113420a433401c8a957de1ed276b2e4f3bbbfd86abc94/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d706167652f76657273696f6e)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-page)[![Build](https://github.com/tecnickcom/tc-lib-pdf-page/actions/workflows/check.yml/badge.svg)](https://github.com/tecnickcom/tc-lib-pdf-page/actions/workflows/check.yml)[![Coverage](https://camo.githubusercontent.com/9edf17f6cce2aef546637933d6f579d8e736bbb4c08dc6e6f692d8c917327168/68747470733a2f2f636f6465636f762e696f2f67682f7465636e69636b636f6d2f74632d6c69622d7064662d706167652f67726170682f62616467652e7376673f746f6b656e3d46364350464849334544)](https://codecov.io/gh/tecnickcom/tc-lib-pdf-page)[![License](https://camo.githubusercontent.com/4ec44a71e2142ff5b6805a6b4cbed030545bf4dff2ea2f6daa176ec637fbc933/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d706167652f6c6963656e7365)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-page)[![Downloads](https://camo.githubusercontent.com/30795b7da19985928bcdd1e48a4dc5e6364b9b8a85f56dbc32cba9a6248c5d1e/68747470733a2f2f706f7365722e707567782e6f72672f7465636e69636b636f6d2f74632d6c69622d7064662d706167652f646f776e6c6f616473)](https://packagist.org/packages/tecnickcom/tc-lib-pdf-page)

[![Sponsor on GitHub](https://camo.githubusercontent.com/dd89cb32d6e7ff9dbb0fa7ce84923567358b220feb9198b3720beabc3153da6a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73706f6e736f722d6769746875622d4541344141412e7376673f6c6f676f3d67697468756273706f6e736f7273266c6f676f436f6c6f723d7768697465)](https://github.com/sponsors/tecnickcom)

> 💖 Part of the [tc-lib-pdf / TCPDF](https://github.com/tecnickcom/tc-lib-pdf) ecosystem (100M+ installs). [Sponsor its maintenance →](https://github.com/sponsors/tecnickcom)

---

Overview
--------

[](#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 **License**[GNU LGPL v3](https://www.gnu.org/copyleft/lesser.html) - see [LICENSE](LICENSE)**API docs****Packagist**---

Features
--------

[](#features)

### Page Model

[](#page-model)

- Standard and custom page size handling
- Orientation and unit conversion helpers
- Region and box definitions (CropBox, TrimBox, and related metadata)

### Integration

[](#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
------------

[](#requirements)

- PHP 8.2 or later
- Extensions: `date`, `zlib`
- Composer

---

Installation
------------

[](#installation)

```
composer require tecnickcom/tc-lib-pdf-page
```

---

Quick Start
-----------

[](#quick-start)

```
