[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"docs:laravel":3},{"versions":4,"version":13,"nav":16,"path":28,"page":80},[5,10],{"name":6,"label":7,"prefix":8,"channel":9},"0.1","0.1.0 (latest)","","latest",{"name":11,"label":12,"prefix":11,"channel":11},"next","next (main)",{"name":6,"label":7,"prefix":8,"channel":9,"base":14,"ref":15},"\u002Fdocs","v0.1.0",[17,21,24,27,30,33,36,39,43,46,49,52,55,58,61,65,68,71,74,77],{"slug":18,"title":19,"group":20},"index","Overview","Guide",{"slug":22,"title":23,"group":20},"getting-started","Getting started",{"slug":25,"title":26,"group":20},"php","PHP API",{"slug":28,"title":29,"group":20},"laravel","Laravel",{"slug":31,"title":32,"group":20},"resources","Resources",{"slug":34,"title":35,"group":20},"deployment","Deployment",{"slug":37,"title":38,"group":20},"troubleshooting","Troubleshooting",{"slug":40,"title":41,"group":42},"css","CSS reference","Reference",{"slug":44,"title":45,"group":42},"paged-media","Paged media",{"slug":47,"title":48,"group":42},"fonts","Fonts",{"slug":50,"title":51,"group":42},"extensions","Extensions",{"slug":53,"title":54,"group":42},"pdf","The PDF",{"slug":56,"title":57,"group":42},"cli","Command line",{"slug":59,"title":60,"group":42},"rust","Rust library",{"slug":62,"title":63,"group":64},"protocol","Worker protocol","Internals",{"slug":66,"title":67,"group":64},"releasing","Releasing",{"slug":69,"title":70,"group":64},"adr\u002F0001-record-architecture-decisions","1. Record architecture decisions",{"slug":72,"title":73,"group":64},"adr\u002F0002-rust-and-fragmentation-in-layout","2. Rust core with fragmentation inside layout",{"slug":75,"title":76,"group":64},"adr\u002F0003-css-parsing-and-own-selector-matching","3. lightningcss for parsing, own selector matching and cascade",{"slug":78,"title":79,"group":64},"adr\u002F0004-extensions-only-where-css-has-no-way","4. Extensions only where CSS has no way",{"title":29,"seoTitle":81,"seoDescription":82,"html":83,"headings":84,"editUrl":138,"sourceUrl":139,"markdownUrl":140,"prev":141,"next":142},"Laravel: PDFs from Blade views","The Laravel integration of Fagus: the facade, Blade views, inline and download responses, filesystem disks, queues, Octane and the configuration.","\u003Ch1 id=\"laravel\">Laravel\u003C\u002Fh1>\n\u003Cp>The package \u003Ccode>nforst\u002Ffagus\u003C\u002Fcode> includes its Laravel integration (\u003Ccode>Fagus\\Laravel\\\u003C\u002Fcode>, in\n\u003Ccode>php\u002Flaravel\u002Fsrc\u003C\u002Fcode>). Laravel 13 discovers it on its own: \u003Ccode>composer require nforst\u002Ffagus\u003C\u002Fcode> registers\nthe service provider, the \u003Ccode>Fagus\u003C\u002Fcode> facade, the configuration and the \u003Ccode>fagus:install\u003C\u002Fcode> command.\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">use\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\\Laravel\\Facades\\Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#8B949E\">\u002F\u002F In a controller: shown in the browser.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">return\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, [\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoice'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> $invoice])\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">name\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoice.pdf'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#8B949E\">\u002F\u002F As a download, on a disk, or as bytes.\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">return\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, $data)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">download\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoice.pdf'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#79C0FF\">Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, $data)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">pdfA\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'3b'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">store\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices\u002F2026-0042.pdf'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'s3'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">$bytes \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">html\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">($html)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">render\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">bytes\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">();\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>Installation is described in \u003Ca href=\"\u002Fdocs\u002Fgetting-started\">getting-started.md\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"the-facade\">The facade\u003Ca class=\"f-doc-anchor\" href=\"#the-facade\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>Fagus\\Laravel\\Facades\\Fagus\u003C\u002Fcode> (also registered as the alias \u003Ccode>Fagus\u003C\u002Fcode>) resolves the service\n\u003Ccode>fagus\u003C\u002Fcode>, an instance of \u003Ccode>Fagus\\Laravel\\PdfFactory\u003C\u002Fcode>. It has four methods:\u003C\u002Fp>\n\u003Ctable class=\"f-doc-table f-stack-table\">\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Method\u003C\u002Fth>\n\u003Cth>Returns\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>Fagus::view(string $view, array $data = [], array $mergeData = [])\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Returns\">A \u003Ccode>PendingPdf\u003C\u002Fcode> from a Blade view, rendered with \u003Ccode>view()-&gt;make($view, $data, $mergeData)\u003C\u002Fcode>.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>Fagus::html(string $html)\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Returns\">A \u003Ccode>PendingPdf\u003C\u002Fcode> from HTML.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>Fagus::xhtml(string $xml)\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Returns\">A \u003Ccode>PendingPdf\u003C\u002Fcode> from XHTML, parsed as XML (see \u003Ca href=\"\u002Fdocs\u002Fphp#fagus\">php.md\u003C\u002Fa>).\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>Fagus::engine()\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Returns\">The application's \u003Ccode>Fagus\\Engine\u003C\u002Fcode>, for \u003Ccode>addFont()\u003C\u002Fcode> and \u003Ccode>version()\u003C\u002Fcode>.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Every \u003Ccode>PendingPdf\u003C\u002Fcode> starts with the base directory, the root and the tagging of the\nconfiguration.\u003C\u002Fp>\n\u003Cp>Do not confuse the facade with the plain PHP class \u003Ccode>Fagus\\Fagus\u003C\u002Fcode>. The class does not read\n\u003Ccode>config\u002Ffagus.php\u003C\u002Fcode> and renders with an engine of its own; in Laravel, import\n\u003Ccode>Fagus\\Laravel\\Facades\\Fagus\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cp>You can inject the factory instead of using the facade:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">use\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\\Laravel\\PdfFactory\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">final\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> class\u003C\u002Fspan>\u003Cspan style=\"color:#FFA657\"> InvoiceMailer\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#FF7B72\">    public\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> function\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> __construct\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">private\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> PdfFactory\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> $pdfs) {}\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#FF7B72\">    public\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> function\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\"> attachment\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">Invoice\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> $invoice)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">:\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> string\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:10ch;text-indent:-10ch\">\u003Cspan style=\"color:#FF7B72\">        return\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> $this\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">pdfs\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, [\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoice'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> $invoice])\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">render\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">bytes\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>Fagus\\Engine\u003C\u002Fcode> is bound as a singleton too, so \u003Ccode>app(Engine::class)\u003C\u002Fcode> is the same engine as\n\u003Ccode>Fagus::engine()\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"pendingpdf\">\u003Ccode>PendingPdf\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#pendingpdf\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>Fagus\\Laravel\\PendingPdf\u003C\u002Fcode> wraps a \u003Ccode>Fagus\\Document\u003C\u002Fcode> together with the engine. Like the document,\nit is immutable: every method returns a changed copy.\u003C\u002Fp>\n\u003Ch3 id=\"document-methods\">Document methods\u003Ca class=\"f-doc-anchor\" href=\"#document-methods\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>These forward to \u003Ccode>Fagus\\Document\u003C\u002Fcode> and take the same arguments; \u003Ca href=\"\u002Fdocs\u002Fphp#document\">php.md\u003C\u002Fa>\ndescribes each one:\u003C\u002Fp>\n\u003Cp>\u003Ccode>baseDirectory()\u003C\u002Fcode>, \u003Ccode>root()\u003C\u002Fcode>, \u003Ccode>stylesheet()\u003C\u002Fcode>, \u003Ccode>resource()\u003C\u002Fcode>, \u003Ccode>resolver()\u003C\u002Fcode>, \u003Ccode>pdfA()\u003C\u002Fcode>, \u003Ccode>tagged()\u003C\u002Fcode>,\n\u003Ccode>accessible()\u003C\u002Fcode>, \u003Ccode>attach()\u003C\u002Fcode>, \u003Ccode>facturX()\u003C\u002Fcode>, \u003Ccode>created()\u003C\u002Fcode>, \u003Ccode>strict()\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">use\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\\Conformance\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">use\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Illuminate\\Support\\Facades\\Vite\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#79C0FF\">Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, [\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoice'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> $invoice])\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#FF7B72\">    ->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">stylesheet\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">Vite\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">content\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'resources\u002Fcss\u002Fpdf.css'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">))\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#FF7B72\">    ->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">resource\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'logo.png'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, $invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">company\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">logo)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#FF7B72\">    ->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">pdfA\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">Conformance\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">PdfA3b\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#FF7B72\">    ->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">facturX\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">($invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">toFacturX\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">());\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Ch3 id=\"namestring-filename-pendingpdf\">\u003Ccode>name(string $filename): PendingPdf\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#namestring-filename-pendingpdf\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The file name for the browser and for downloads. \u003Ccode>document.pdf\u003C\u002Fcode> by default.\u003C\u002Fp>\n\u003Ch3 id=\"inlinestring-filename--null-response\">\u003Ccode>inline(?string $filename = null): Response\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#inlinestring-filename--null-response\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Renders the PDF and returns a response that shows it in the browser\n(\u003Ccode>Content-Disposition: inline\u003C\u002Fcode>). The file name is \u003Ccode>$filename\u003C\u002Fcode>, else the one from \u003Ccode>name()\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch3 id=\"downloadstring-filename--null-response\">\u003Ccode>download(?string $filename = null): Response\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#downloadstring-filename--null-response\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Renders the PDF and returns a response that downloads it (\u003Ccode>Content-Disposition: attachment\u003C\u002Fcode>).\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">return\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, $data)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">download\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"invoice-{\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">$invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">number\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">}.pdf\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>Both responses are \u003Ccode>Illuminate\\Http\\Response\u003C\u002Fcode> with \u003Ccode>Content-Type: application\u002Fpdf\u003C\u002Fcode>. File names\nwith characters outside ASCII are sent as \u003Ccode>filename*=utf-8''…\u003C\u002Fcode> with an ASCII fallback, so\n\u003Ccode>Übersicht März.pdf\u003C\u002Fcode> arrives as written.\u003C\u002Fp>\n\u003Ch3 id=\"toresponserequest-response\">\u003Ccode>toResponse($request): Response\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#toresponserequest-response\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>\u003Ccode>PendingPdf\u003C\u002Fcode> implements \u003Ccode>Responsable\u003C\u002Fcode>: returned from a controller or route, it renders the PDF and\nshows it inline, as \u003Ccode>inline()\u003C\u002Fcode> does.\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#79C0FF\">Route\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">get\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'\u002Finvoices\u002F{invoice}\u002Fpdf'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">fn\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> (\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">Invoice\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> $invoice) => \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'invoice'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> $invoice,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">])\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">name\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"invoice-{\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">$invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">number\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">}.pdf\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">));\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Ch3 id=\"storestring-path-string-disk--null-pdf\">\u003Ccode>store(string $path, ?string $disk = null): Pdf\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#storestring-path-string-disk--null-pdf\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Renders the PDF and writes it to a filesystem disk, the default disk if \u003Ccode>$disk\u003C\u002Fcode> is \u003Ccode>null\u003C\u002Fcode>.\nReturns the \u003Ccode>Fagus\\Pdf\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">$pdf \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, $data)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">store\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"invoices\u002F{\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">$invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">number\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">}.pdf\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'s3'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">$pdf\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">pages\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">();\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Ch3 id=\"savestring-path-pdf\">\u003Ccode>save(string $path): Pdf\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#savestring-path-pdf\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Renders the PDF and writes it to a local path.\u003C\u002Fp>\n\u003Ch3 id=\"render-pdf\">\u003Ccode>render(): Pdf\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#render-pdf\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Renders the PDF and returns the \u003Ccode>Fagus\\Pdf\u003C\u002Fcode> with its bytes, page count, diagnostics and timings\n(see \u003Ca href=\"\u002Fdocs\u002Fphp#pdf\">php.md\u003C\u002Fa>).\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">$pdf \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'reports.monthly'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, $data)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">render\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#79C0FF\">Mail\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">to\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">($customer)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">send\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">new\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> MonthlyReport\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">($pdf\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">bytes\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()));\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Ch3 id=\"document-document\">\u003Ccode>document(): Document\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#document-document\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The underlying \u003Ccode>Fagus\\Document\u003C\u002Fcode>, for code that works with the plain PHP API.\u003C\u002Fp>\n\u003Ch2 id=\"queues\">Queues\u003Ca class=\"f-doc-anchor\" href=\"#queues\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Render PDFs in a job when they take long or when nobody waits for them:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">use\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\\Laravel\\Facades\\Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">use\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Illuminate\\Contracts\\Queue\\ShouldQueue\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">use\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Illuminate\\Foundation\\Queue\\Queueable\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">final\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> class\u003C\u002Fspan>\u003Cspan style=\"color:#FFA657\"> StoreInvoicePdf\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> implements\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> ShouldQueue\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#FF7B72\">    use\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Queueable\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#FF7B72\">    public\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> function\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> __construct\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">public\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Invoice\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> $invoice) {}\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#FF7B72\">    public\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> function\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\"> handle\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">:\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> void\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:10ch;text-indent:-10ch\">\u003Cspan style=\"color:#79C0FF\">        Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, [\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoice'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> $this\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">invoice])\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:14ch;text-indent:-14ch\">\u003Cspan style=\"color:#FF7B72\">            ->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">pdfA\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'3b'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:14ch;text-indent:-14ch\">\u003Cspan style=\"color:#FF7B72\">            ->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">store\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"invoices\u002F{\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">$this\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">number\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">}.pdf\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'s3'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>The engine is a singleton. In \u003Ccode>php artisan queue:work\u003C\u002Fcode> (and in Horizon's workers), the worker\nprocess starts with the first PDF and serves every following job of that queue worker, so a job\npays only for rendering. \u003Ccode>php artisan queue:listen\u003C\u002Fcode> boots the application for every job, which\nstarts a new worker process each time.\u003C\u002Fp>\n\u003Cp>After deploying a new version of the package, restart the queue workers\n(\u003Ccode>php artisan queue:restart\u003C\u002Fcode>) so that they use the new binary.\u003C\u002Fp>\n\u003Ch2 id=\"octane-and-frankenphp\">Octane and FrankenPHP\u003Ca class=\"f-doc-anchor\" href=\"#octane-and-frankenphp\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Under PHP-FPM, the engine lives as long as the request: the first PDF of each request starts the\nworker process (a few milliseconds), and the request's end stops it.\u003C\u002Fp>\n\u003Cp>Under Octane (Swoole, RoadRunner or FrankenPHP), the application boots once per Octane worker.\nOctane gives each request a copy of the application's container and throws away what a request\nresolved when it ends: an engine resolved in a request would start a worker process and stop it\nagain at the request's end. So when Octane is installed, the service provider adds\n\u003Ccode>Fagus\\Engine\u003C\u002Fcode> to the \u003Ccode>warm\u003C\u002Fcode> services of \u003Ccode>config\u002Foctane.php\u003C\u002Fcode>, which Octane resolves when its\nworker boots and shares with every request. One engine, and its worker process, then serves every\nPDF of the Octane worker; there is nothing to configure. Listing \u003Ccode>\\Fagus\\Engine::class\u003C\u002Fcode> in \u003Ccode>warm\u003C\u002Fcode>\nyourself does no harm.\u003C\u002Fp>\n\u003Cp>More on worker processes, memory and timeouts: \u003Ca href=\"\u002Fdocs\u002Fdeployment#worker-processes\">deployment.md\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"configuration\">Configuration\u003Ca class=\"f-doc-anchor\" href=\"#configuration\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Publish the configuration file to change it:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>sh\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FFA657\">php\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> artisan\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> vendor:publish\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --tag=fagus-config\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>This writes \u003Ccode>config\u002Ffagus.php\u003C\u002Fcode>. Every key, with its environment variable and default:\u003C\u002Fp>\n\u003Ctable class=\"f-doc-table f-stack-table\">\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Key\u003C\u002Fth>\n\u003Cth>Environment variable\u003C\u002Fth>\n\u003Cth>Default\u003C\u002Fth>\n\u003Cth>Meaning\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>binary\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Environment variable\">\u003Ccode>FAGUS_BINARY\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>null\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">The path of the \u003Ccode>fagus\u003C\u002Fcode> binary. If \u003Ccode>null\u003C\u002Fcode>: the one the package installed (with Composer or \u003Ccode>php artisan fagus:install\u003C\u002Fcode>), else the one on the \u003Ccode>PATH\u003C\u002Fcode>. A path that is set must exist.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>fonts\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Environment variable\">–\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>[resource_path('fonts')]\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">Directories with fonts for every document: TTF, OTF, TTC, OTC, WOFF and WOFF2 files, in the directory and its subdirectories. Directories that do not exist are skipped, so the default works without a \u003Ccode>resources\u002Ffonts\u003C\u002Fcode>; a plain \u003Ccode>Fagus\\Engine\u003C\u002Fcode> throws an \u003Ccode>EngineException\u003C\u002Fcode> for them instead.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>system_fonts\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Environment variable\">\u003Ccode>FAGUS_SYSTEM_FONTS\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>false\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">Whether the fonts installed on the machine serve too, as in Chrome. Off, so that documents look the same on every machine.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>locale\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Environment variable\">\u003Ccode>FAGUS_LOCALE\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>null\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">The language of the texts that form controls show of their own (button labels, date formats) and of the PDF where a document gives no \u003Ccode>lang\u003C\u002Fcode>, such as \u003Ccode>de-DE\u003C\u002Fcode>. American English if \u003Ccode>null\u003C\u002Fcode>.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>families\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Environment variable\">–\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>['sans-serif' =&gt; null, 'serif' =&gt; null, 'monospace' =&gt; null]\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">The families that the generic families name.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>base_directory\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Environment variable\">–\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>public_path()\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">The directory that relative URLs in documents resolve against. Only files inside it, or inside \u003Ccode>root\u003C\u002Fcode>, are read.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>root\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Environment variable\">–\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>null\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">A larger directory that contains \u003Ccode>base_directory\u003C\u002Fcode>, for documents whose URLs lead out of it (\u003Ccode>..\u002Ffonts\u002F…\u003C\u002Fcode>). URLs that start with \u003Ccode>\u002F\u003C\u002Fcode> resolve against it.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>tagged\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Environment variable\">–\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>true\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">Whether PDFs are tagged with the logical structure that screen readers read. Single documents can say otherwise with \u003Ccode>tagged()\u003C\u002Fcode> or ask for PDF\u002FUA with \u003Ccode>accessible()\u003C\u002Fcode>.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>timeout\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Environment variable\">–\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>60\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">Seconds to wait for each answer of the worker before it is stopped. Not on Windows, where PHP cannot wait for a pipe with a time limit.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>\u003Ccode>binary\u003C\u002Fcode>, \u003Ccode>fonts\u003C\u002Fcode>, \u003Ccode>system_fonts\u003C\u002Fcode>, \u003Ccode>locale\u003C\u002Fcode>, \u003Ccode>families\u003C\u002Fcode> and \u003Ccode>timeout\u003C\u002Fcode> configure the engine;\n\u003Ccode>base_directory\u003C\u002Fcode>, \u003Ccode>root\u003C\u002Fcode> and \u003Ccode>tagged\u003C\u002Fcode> apply to each new \u003Ccode>PendingPdf\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#8B949E\">\u002F\u002F config\u002Ffagus.php\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">return\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'binary'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\"> env\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'FAGUS_BINARY'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'fonts'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> [\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">resource_path\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'fonts'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">)],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'system_fonts'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\"> env\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'FAGUS_SYSTEM_FONTS'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">false\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'locale'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\"> env\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'FAGUS_LOCALE'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'de-DE'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'families'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> [\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:10ch;text-indent:-10ch\">\u003Cspan style=\"color:#A5D6FF\">        'sans-serif'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> 'Inter'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:10ch;text-indent:-10ch\">\u003Cspan style=\"color:#A5D6FF\">        'serif'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> null\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:10ch;text-indent:-10ch\">\u003Cspan style=\"color:#A5D6FF\">        'monospace'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> 'JetBrains Mono'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'base_directory'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\"> resource_path\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'pdf'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'root'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\"> resource_path\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'tagged'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> true\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#A5D6FF\">    'timeout'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> 30\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">];\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>With \u003Ccode>base_directory\u003C\u002Fcode> at \u003Ccode>public_path()\u003C\u002Fcode>, a view refers to files of \u003Ccode>public\u002F\u003C\u002Fcode> as a page of the\nsite would: \u003Ccode>&lt;img src=&quot;\u002Fimages\u002Flogo.png&quot;&gt;\u003C\u002Fcode> reads \u003Ccode>public\u002Fimages\u002Flogo.png\u003C\u002Fcode>. Absolute URLs from\n\u003Ccode>asset()\u003C\u002Fcode>, \u003Ccode>url()\u003C\u002Fcode> or \u003Ccode>@vite\u003C\u002Fcode> start with \u003Ccode>http\u003C\u002Fcode> and are not loaded; see\n\u003Ca href=\"\u002Fdocs\u002Fresources#laravel-assets-and-vite\">resources.md\u003C\u002Fa> for how to use them.\u003C\u002Fp>\n\u003Ch2 id=\"php-artisan-fagusinstall\">\u003Ccode>php artisan fagus:install\u003C\u002Fcode>\u003Ca class=\"f-doc-anchor\" href=\"#php-artisan-fagusinstall\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Installs the \u003Ccode>fagus\u003C\u002Fcode> binary of the package's release for the platform PHP runs on, as the\nComposer plugin does after \u003Ccode>composer install\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>sh\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FFA657\">php\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> artisan\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> fagus:install\u003C\u002Fspan>\u003Cspan style=\"color:#8B949E\">              # where the engine finds it\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FFA657\">php\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> artisan\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> fagus:install\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> \u002Fopt\u002Ffagus\u003C\u002Fspan>\u003Cspan style=\"color:#8B949E\">   # into another directory\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>It takes \u003Ccode>FAGUS_DOWNLOAD_URL\u003C\u002Fcode> and \u003Ccode>FAGUS_GITHUB_TOKEN\u003C\u002Fcode> (or \u003Ccode>GITHUB_TOKEN\u003C\u002Fcode>) from the environment,\nlike \u003Ccode>vendor\u002Fbin\u002Ffagus-install\u003C\u002Fcode>. A binary installed into another directory must be named in\n\u003Ccode>FAGUS_BINARY\u003C\u002Fcode> (or the \u003Ccode>binary\u003C\u002Fcode> key) or lie on the \u003Ccode>PATH\u003C\u002Fcode>. See \u003Ca href=\"\u002Fdocs\u002Fdeployment\">deployment.md\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"diagnostics-and-errors\">Diagnostics and errors\u003Ca class=\"f-doc-anchor\" href=\"#diagnostics-and-errors\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>\u003Ccode>render()\u003C\u002Fcode>, \u003Ccode>store()\u003C\u002Fcode> and \u003Ccode>save()\u003C\u002Fcode> return the \u003Ccode>Fagus\\Pdf\u003C\u002Fcode>, whose \u003Ccode>diagnostics()\u003C\u002Fcode> lists CSS that\nwas ignored and resources that were not found. Log them while you build a template:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">$pdf \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, $data)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">render\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">foreach\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> ($pdf\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">diagnostics\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">() \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">as\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> $diagnostic) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#79C0FF\">    Log\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">warning\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">((\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">string\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">) $diagnostic);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>inline()\u003C\u002Fcode> and \u003Ccode>download()\u003C\u002Fcode> render and discard the diagnostics. Errors are exceptions\n(\u003Ccode>Fagus\\Exception\\RenderException\u003C\u002Fcode>, \u003Ccode>EngineException\u003C\u002Fcode>), which Laravel reports as usual. A\n\u003Ccode>RenderException\u003C\u002Fcode> keeps the diagnostics found before the document was refused in its\n\u003Ccode>diagnostics()\u003C\u002Fcode>. See \u003Ca href=\"\u002Fdocs\u002Ftroubleshooting\">troubleshooting.md\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"testing\">Testing\u003Ca class=\"f-doc-anchor\" href=\"#testing\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The package has no fake. PDFs render in a few milliseconds, so tests can render them with the real\nbinary: the Composer plugin installs it with \u003Ccode>composer install\u003C\u002Fcode> on the developer's machine and in\nCI, as long as \u003Ccode>allow-plugins\u003C\u002Fcode> permits it.\u003C\u002Fp>\n\u003Cp>Assert on the response of a route:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">public\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> function\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\"> test_the_invoice_pdf_is_shown\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">:\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> void\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    $invoice \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">factory\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">create\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    $response \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> $this\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">get\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"\u002Finvoices\u002F{\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">$invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">id\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">}\u002Fpdf\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    $response\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">assertOk\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    $response\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">assertHeader\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'Content-Type'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'application\u002Fpdf'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#79C0FF\">    $this\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">assertStringStartsWith\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'%PDF-'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, $response\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">getContent\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">());\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>Fake the disk to check \u003Ccode>store()\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#79C0FF\">Storage\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">fake\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'s3'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#79C0FF\">StoreInvoicePdf\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">dispatchSync\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">($invoice);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#79C0FF\">Storage\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">disk\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'s3'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">)\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">assertExists\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"invoices\u002F{\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">$invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">number\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">}.pdf\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">);\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>Make a template fail on every ignored declaration and missing resource with \u003Ccode>strict()\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>php\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FF7B72\">public\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> function\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\"> test_the_invoice_template_is_clean\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">:\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> void\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    $pdf \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Fagus\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">view\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoices.show'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, [\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'invoice'\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =>\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> Invoice\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">::\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">factory\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">make\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()])\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:10ch;text-indent:-10ch\">\u003Cspan style=\"color:#FF7B72\">        ->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">strict\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:10ch;text-indent:-10ch\">\u003Cspan style=\"color:#FF7B72\">        ->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">render\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">();\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#79C0FF\">    $this\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">assertSame\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">1\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, $pdf\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">->\u003C\u002Fspan>\u003Cspan style=\"color:#D2A8FF\">pages\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">());\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>To render with a binary of your own in tests, set \u003Ccode>FAGUS_BINARY\u003C\u002Fcode> in \u003Ccode>phpunit.xml\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>xml\u003C\u002Fspan>\u003Cbutton type=\"button\" class=\"f-doc-copy\" data-copy aria-label=\"Copy code\">\u003Csvg xmlns=\"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fsvg>\u003Cspan>Copy\u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">php\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:6ch;text-indent:-6ch\">\u003Cspan style=\"color:#E6EDF3\">    &#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">env\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> name\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">=\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"FAGUS_BINARY\"\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> value\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">=\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"\u002Fusr\u002Flocal\u002Fbin\u002Ffagus\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">\u002F>\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#E6EDF3\">&#x3C;\u002F\u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">php\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n",[85,89,92,96,99,102,105,108,111,114,117,120,123,126,129,132,135],{"id":86,"text":87,"level":88},"the-facade","The facade",2,{"id":90,"text":91,"level":88},"pendingpdf","PendingPdf",{"id":93,"text":94,"level":95},"document-methods","Document methods",3,{"id":97,"text":98,"level":95},"namestring-filename-pendingpdf","name(string $filename): PendingPdf",{"id":100,"text":101,"level":95},"inlinestring-filename--null-response","inline(?string $filename = null): Response",{"id":103,"text":104,"level":95},"downloadstring-filename--null-response","download(?string $filename = null): Response",{"id":106,"text":107,"level":95},"toresponserequest-response","toResponse($request): Response",{"id":109,"text":110,"level":95},"storestring-path-string-disk--null-pdf","store(string $path, ?string $disk = null): Pdf",{"id":112,"text":113,"level":95},"savestring-path-pdf","save(string $path): Pdf",{"id":115,"text":116,"level":95},"render-pdf","render(): Pdf",{"id":118,"text":119,"level":95},"document-document","document(): Document",{"id":121,"text":122,"level":88},"queues","Queues",{"id":124,"text":125,"level":88},"octane-and-frankenphp","Octane and FrankenPHP",{"id":127,"text":128,"level":88},"configuration","Configuration",{"id":130,"text":131,"level":88},"php-artisan-fagusinstall","php artisan fagus:install",{"id":133,"text":134,"level":88},"diagnostics-and-errors","Diagnostics and errors",{"id":136,"text":137,"level":88},"testing","Testing","https:\u002F\u002Fgithub.com\u002Fnforst\u002Ffagus\u002Fedit\u002Fmain\u002Fdocs\u002Flaravel.md","https:\u002F\u002Fgithub.com\u002Fnforst\u002Ffagus\u002Fblob\u002Fv0.1.0\u002Fdocs\u002Flaravel.md","\u002Fdocs\u002Flaravel.md",{"slug":25,"title":26},{"slug":31,"title":32}]