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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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

PHP Build Version
Package Version
Requires php Version ^8.2
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pat-o-dev/factur-x-laravel contains the following files

Loading the files please wait ...