tecnickcom/tc-lib-pdf-page
Composer 安装命令:
composer require tecnickcom/tc-lib-pdf-page
包简介
PHP library containing PDF page formats and definitions
README 文档
README
Page geometry, boxes, and format definitions for PDF documents.
💖 Part of the tc-lib-pdf / TCPDF ecosystem (100M+ installs). Sponsor its maintenance →
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.2 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.
统计信息
- 总下载量: 712.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 11
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2015-09-12