Download the PHP package pat-o-dev/factur-x-laravel without Composer
On this page you can find all versions of the php package pat-o-dev/factur-x-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pat-o-dev/factur-x-laravel
More information about pat-o-dev/factur-x-laravel
Files in pat-o-dev/factur-x-laravel
Package factur-x-laravel
Short Description Laravel bridge for pat-o-dev/factur-x: ServiceProvider, Facade and Artisan command to generate Factur-X invoices.
License MIT
Informations about the package factur-x-laravel
pat-o-dev/factur-x-laravel
Laravel bridge for pat-o-dev/factur-x:
a ServiceProvider, a FacturX facade, a default invoice template, and a
full Invoice → rendered PDF → Factur-X hybrid PDF pipeline.
Installation
Usage
Low-level: XML / hybridizing your own PDF
Full pipeline: render the invoice template and hybridize in one call
FacturXInvoiceGenerator renders a Blade view to HTML, converts it to PDF/A
via mPDF, then hybridizes it — no need to bring your own PDF renderer:
Picking a view per invoice (e.g. letting users choose a template)
render()/generate() accept an optional $view to use a different Blade
view than config('factur-x.view') for a single invoice — handy if your
app defines several templates and lets the user pick one:
The package itself only ships one template; any others (e.g. "Modern", "Compact") are plain Blade views you own in your app — this parameter just lets you pick one at render time instead of only via config.
Customizing the invoice template
Publish the default Blade view and edit it directly:
Or point config('factur-x.view') at your own view name entirely.
Using a different rendering engine (Twig, pre-rendered React/Vue, ...)
FacturXInvoiceGenerator depends on the
PatODev\FacturX\Laravel\Rendering\InvoiceHtmlRenderer interface
(render(Invoice $invoice, ?string $view = null): string, returning HTML),
bound by default to BladeInvoiceRenderer. Rebind it in a service provider
to swap engines:
Note: the HTML is converted to PDF/A by mPDF, which renders static HTML/CSS only — it does not execute JavaScript. A React/Vue-based renderer must server-side render to a plain HTML string before returning it (client-side hydration won't run inside the PDF converter).
mPDF / PDF/A options
config('factur-x.pdfa_version') (default 3-B) and
config('factur-x.mpdf_config') (merged into the Mpdf constructor config,
e.g. format, tempDir) control the base PDF produced by the default
InvoicePdfARenderer (MpdfInvoicePdfRenderer). Swap that binding the same
way as InvoiceHtmlRenderer to use a different PDF/A engine (e.g. TCPDF).
Publishing
Testing
All versions of factur-x-laravel with dependencies
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/view Version ^11.0|^12.0|^13.0
mpdf/mpdf Version ^8.2
pat-o-dev/factur-x Version ^0.8