- What is tecnickcom/tc-lib-pdf-page used for?
- It is a low-level PHP library for PDF page formats and definitions. It manages page sizing, orientation, unit conversion helpers, and box metadata such as CropBox and TrimBox. It provides the structural page model that document builders use, rather than being a complete PDF renderer by itself.
- How do I install tc-lib-pdf-page in a Laravel project?
- Install it with Composer using composer require tecnickcom/tc-lib-pdf-page. The package requires PHP 8.2 or later and the zlib extension. There is no Laravel service provider or facade to register; use the Com\Tecnick\Pdf\Page namespace after autoloading.
- Does tc-lib-pdf-page support Laravel 10 or Laravel 11?
- It is a framework-agnostic Composer package, so it can be used in Laravel 10, Laravel 11, or other Laravel versions that run on PHP 8.2 or later. It does not ship Laravel-specific integrations. Check your application's PHP platform requirements before adding it.
- Do I need to publish configuration for tc-lib-pdf-page?
- No configuration publishing step is described for this package. Page sizes, orientation, units, and box definitions are configured programmatically through its page model classes. There are no Laravel config files or environment variables specific to this library.
- Can tc-lib-pdf-page generate a complete PDF in Laravel?
- No, it focuses on page geometry, formats, boxes, and related metadata. For complete PDF document generation, pair it with the broader tc-lib-pdf or TCPDF stack. The README also notes that it pairs with color and encryption libraries for complete page objects.
- What page features does tc-lib-pdf-page provide?
- It handles standard and custom page sizes, orientation changes, and unit conversion helpers. It also defines regions and boxes such as CropBox, TrimBox, and related metadata. Typed exceptions are provided for invalid layout parameters.
- Is tc-lib-pdf-page compatible with TCPDF or tc-lib-pdf?
- Yes, it is part of the tc-lib-pdf and TCPDF ecosystem. It supports PDF composition stacks that need deterministic page geometry and is intended as a lower-level page model dependency. It is not a replacement for the full TCPDF or tc-lib-pdf rendering stack.
- How should I test PDF page geometry in a Laravel app?
- Instantiate the page model classes and assert the resulting dimensions, orientation, and box definitions in your test suite. The package has CI build and coverage badges, but it does not provide Laravel-specific test helpers. Keep your assertions focused on the geometry values your application depends on.
- What are the production concerns for tc-lib-pdf-page?
- The package is licensed under GNU LGPL v3, so review the license terms for your distribution model. It requires PHP 8.2 or later and zlib, and it is distributed through Packagist as part of a widely installed TCPDF-related ecosystem. Use Composer version locking as you would for any production dependency.
- What alternatives exist to tc-lib-pdf-page?
- For full PDF generation, developers often evaluate TCPDF, tc-lib-pdf, FPDF, dompdf, or mPDF. This package is narrower and focuses specifically on page formats, geometry, and box definitions. Choose an alternative based on whether you need a complete renderer or only low-level page modeling.