tiime / factur-x
PHP library to manage your Factur-X (PDF invoices files)
0.2.0
2024-10-31 08:44 UTC
Requires
- php: >=8.3
- ext-dom: *
- ext-fileinfo: *
- ext-libxml: *
- ext-simplexml: *
- ext-zlib: *
- ramsey/uuid: ^4.7
- setasign/fpdf: ^1.8
- setasign/fpdi: ^2.6
- smalot/pdfparser: ^2.11
- tiime/en-16931: ^0.10.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2024-12-01 00:11:43 UTC
README
Install with Composer
composer require tiime/factur-x
Usage
Generate Factur-X
Create a Factur-X compliant PDF document by merging provided PDF content with XML data and optionally adding a logo.
use Tiime\FacturX\Writer; $writer = new Writer(); $facturxContent = $writer->generate( pdfContent: $pdfContent, xmlContent: $xml, addLogo: true ); file_put_contents('generated_facturx.pdf', $facturxContent);
Extract XML from Factur-X
Extract XML data from a Factur-X compliance PDF document.
use Tiime\FacturX\Reader; $extractedXml = (new Reader())->extractXML($writer);