[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"docs:cli":3},{"versions":4,"version":13,"nav":16,"path":56,"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":57,"seoTitle":81,"seoDescription":82,"html":83,"headings":84,"editUrl":107,"sourceUrl":108,"markdownUrl":109,"prev":110,"next":111},"Command line: HTML to PDF with the fagus binary","The fagus binary renders HTML files to PDF on the command line, exactly as the PHP package does: options, exit codes, examples, threads and the worker.","\u003Ch1 id=\"command-line\">Command line\u003C\u002Fh1>\n\u003Cp>The \u003Ccode>fagus\u003C\u002Fcode> binary renders HTML files to PDF on the command line. It is the same binary the PHP\npackage runs as its worker, so it renders exactly as the PHP package does. Use it to try a\ntemplate, in shell scripts and build jobs, or from languages other than PHP.\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.html\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> -o\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.pdf\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Ch2 id=\"get-the-binary\">Get the binary\u003Ca class=\"f-doc-anchor\" href=\"#get-the-binary\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Composer installs the binary of the package's release into the package's \u003Ccode>bin\u003C\u002Fcode> directory\n(\u003Ccode>vendor\u002Fnforst\u002Ffagus\u002Fphp\u002Ffagus\u002Fbin\u002Ffagus\u003C\u002Fcode>, \u003Ccode>fagus.exe\u003C\u002Fcode> on Windows); see\n\u003Ca href=\"\u002Fdocs\u002Fgetting-started\">getting-started.md\u003C\u002Fa>. A checkout of the repository builds it with\n\u003Ccode>cargo build --release\u003C\u002Fcode> as \u003Ccode>target\u002Frelease\u002Ffagus\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --version\u003C\u002Fspan>\u003Cspan style=\"color:#8B949E\">     # fagus 0.1.0\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FFA657\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --help\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FFA657\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --help\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Ch2 id=\"render-an-html-file\">Render an HTML file\u003Ca class=\"f-doc-anchor\" href=\"#render-an-html-file\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> &#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">INPU\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">T\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">>\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --output\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> &#x3C;\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">OUTPU\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">T\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">>\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> [OPTIONS]\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>fagus render\u003C\u002Fcode> reads the HTML file \u003Ccode>INPUT\u003C\u002Fcode> and writes the PDF to \u003Ccode>OUTPUT\u003C\u002Fcode>. Relative URLs in the\ndocument (style sheets, images, fonts) resolve against the directory of the input file, and files\nare only read from inside that directory, or from inside \u003Ccode>--root\u003C\u002Fcode>. Nothing is loaded from the\nnetwork.\u003C\u002Fp>\n\u003Cp>A file ending in \u003Ccode>.xhtml\u003C\u002Fcode> or \u003Ccode>.xht\u003C\u002Fcode> is parsed as XML, as browsers parse XHTML files; any other\nfile as HTML.\u003C\u002Fp>\n\u003Ctable class=\"f-doc-table f-stack-table\">\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Option\u003C\u002Fth>\n\u003Cth>Default\u003C\u002Fth>\n\u003Cth>Description\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>-o\u003C\u002Fcode>, \u003Ccode>--output &lt;FILE&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">required\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The PDF file to write\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--font-dir &lt;DIR&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">A directory with font files (TTF, OTF, TTC, OTC, WOFF, WOFF2), read with its subdirectories; repeatable\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--system-fonts\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">off\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Use the fonts installed on the machine too, as Chrome does; the output then depends on the machine\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--locale &lt;TAG&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The language of the texts form controls show (button labels, date formats) where the document gives no \u003Ccode>lang\u003C\u002Fcode>, e.g. \u003Ccode>de-DE\u003C\u002Fcode>; without it they are American English. Text without \u003Ccode>lang\u003C\u002Fcode> is shaped in it, and it is the PDF's language when \u003Ccode>&lt;html&gt;\u003C\u002Fcode> has no \u003Ccode>lang\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--sans-serif &lt;FAMILY&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The family used for \u003Ccode>sans-serif\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--serif &lt;FAMILY&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The family used for \u003Ccode>serif\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--monospace &lt;FAMILY&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The family used for \u003Ccode>monospace\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--root &lt;DIR&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">the input's directory\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">A larger directory the document may read files from, which contains the input's directory; URLs starting with \u003Ccode>\u002F\u003C\u002Fcode> resolve against it\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--pdfa &lt;LEVEL&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Write PDF\u002FA: \u003Ccode>2b\u003C\u002Fcode>, \u003Ccode>2u\u003C\u002Fcode>, \u003Ccode>2a\u003C\u002Fcode>, \u003Ccode>3b\u003C\u002Fcode>, \u003Ccode>3u\u003C\u002Fcode> or \u003Ccode>3a\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--untagged\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">off\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Write a PDF without tags (the logical structure screen readers read)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--accessible\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">off\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Write PDF\u002FUA-1; needs a title, a language and alternative text for images\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--attach &lt;FILE&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Attach a file; repeatable\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--factur-x &lt;FILE&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Make a ZUGFeRD \u002F Factur-X invoice with this XML\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--profile &lt;PROFILE&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">the XML's\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The invoice profile: \u003Ccode>minimum\u003C\u002Fcode>, \u003Ccode>basicwl\u003C\u002Fcode>, \u003Ccode>basic\u003C\u002Fcode>, \u003Ccode>en16931\u003C\u002Fcode>, \u003Ccode>extended\u003C\u002Fcode> or \u003Ccode>xrechnung\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--created &lt;DATE&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">now\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The creation date, e.g. \u003Ccode>2026-11-13T12:00:00Z\u003C\u002Fcode> or \u003Ccode>2026-11-13T14:00:00+02:00\u003C\u002Fcode>, for reproducible files\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--strict\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">off\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Fail on any diagnostic (not only warnings), without writing the PDF\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--timings\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">off\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Print the page count and the time of each phase\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--repeat &lt;N&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003Ccode>1\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Render N times and report the median time (for benchmarks)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>-h\u003C\u002Fcode>, \u003Ccode>--help\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Print help\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>The options mean what the methods of the PHP package mean; \u003Ca href=\"\u002Fdocs\u002Fpdf\">pdf.md\u003C\u002Fa> describes PDF\u002FA,\nPDF\u002FUA, attachments, invoices and reproducible output in detail.\u003C\u002Fp>\n\u003Cp>Some details of the command line:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>--attach\u003C\u002Fcode> attaches the file under its file name, with the file name as description and the\nrelationship \u003Ccode>Supplement\u003C\u002Fcode>. The MIME type comes from the extension: \u003Ccode>xml\u003C\u002Fcode> (\u003Ccode>text\u002Fxml\u003C\u002Fcode>), \u003Ccode>pdf\u003C\u002Fcode>,\n\u003Ccode>csv\u003C\u002Fcode>, \u003Ccode>json\u003C\u002Fcode>, \u003Ccode>txt\u003C\u002Fcode>, \u003Ccode>png\u003C\u002Fcode>, \u003Ccode>jpg\u003C\u002Fcode> and \u003Ccode>jpeg\u003C\u002Fcode>; any other file is \u003Ccode>application\u002Foctet-stream\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Ccode>--profile\u003C\u002Fcode> only applies together with \u003Ccode>--factur-x\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Ccode>--created\u003C\u002Fcode> reads the date, the time and an offset from UTC (\u003Ccode>Z\u003C\u002Fcode>, \u003Ccode>+01:00\u003C\u002Fcode>, \u003Ccode>-0530\u003C\u002Fcode>) and\nwrites the date in UTC: \u003Ccode>2026-11-13T12:00:00+02:00\u003C\u002Fcode> becomes \u003Ccode>2026-11-13T10:00:00Z\u003C\u002Fcode>. A date\nwithout an offset is taken as UTC; a fraction of a second is dropped. Anything else after the\nseconds makes the date invalid.\u003C\u002Fli>\n\u003Cli>\u003Ccode>--untagged\u003C\u002Fcode> has no effect with \u003Ccode>--accessible\u003C\u002Fcode> or with \u003Ccode>--pdfa 2a\u003C\u002Fcode> and \u003Ccode>3a\u003C\u002Fcode>, which need tags.\u003C\u002Fli>\n\u003Cli>With \u003Ccode>--repeat\u003C\u002Fcode>, the PDF of the last run is written.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"read-and-write\">Read and write\u003Ca class=\"f-doc-anchor\" href=\"#read-and-write\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The input is a file path; \u003Ccode>fagus render\u003C\u002Fcode> does not read from standard input. Write the HTML to a\nfile first, or use the worker or the PHP package.\u003C\u002Fp>\n\u003Cp>On Linux and macOS, the PDF can go to standard output through \u003Ccode>\u002Fdev\u002Fstdout\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.html\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> -o\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> \u002Fdev\u002Fstdout\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> |\u003C\u002Fspan>\u003Cspan style=\"color:#FFA657\"> aws\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> s3\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> cp\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> -\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> s3:\u002F\u002Finvoices\u002F2026-0042.pdf\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>Diagnostics and timings go to standard error, one per line:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>text\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>&#x3C;style> 1:12:3: warning[css.unknown-property]: unknown property `colr`; the declaration is ignored\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan>resources: warning[resource.not-loaded]: image `logo.png` could not be loaded\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>Each line has the source (a file name, \u003Ccode>&lt;style&gt; 1\u003C\u002Fcode> for the first \u003Ccode>&lt;style&gt;\u003C\u002Fcode> element, \u003Ccode>resources\u003C\u002Fcode>,\n\u003Ccode>pdf\u003C\u002Fcode>), the line and column where known, the severity, a stable code and the message. The page\nis written in spite of warnings unless \u003Ccode>--strict\u003C\u002Fcode> is given, which fails on any diagnostic\n(&quot;1 diagnostic in strict mode&quot;). When a document is refused (PDF\u002FA, PDF\u002FUA), the diagnostics found\nbefore are printed too, ahead of the error.\u003C\u002Fp>\n\u003Ch2 id=\"exit-codes\">Exit codes\u003Ca class=\"f-doc-anchor\" href=\"#exit-codes\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Ctable class=\"f-doc-table f-stack-table\">\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Code\u003C\u002Fth>\n\u003Cth>Meaning\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>0\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">The PDF was written, or help or the version was printed\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>1\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">Rendering failed: the input or a font directory could not be read, the document was refused (PDF\u002FA, PDF\u002FUA), \u003Ccode>--strict\u003C\u002Fcode> found diagnostics, \u003Ccode>--created\u003C\u002Fcode> is not a date, or the PDF could not be written. The reason goes to standard error, after \u003Ccode>Error:\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>2\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Meaning\">The command line is wrong: an unknown option, a missing \u003Ccode>--output\u003C\u002Fcode> or input, a value that is not allowed (\u003Ccode>--pdfa 1b\u003C\u002Fcode>)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>text\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>$ fagus render letter.html -o letter.pdf --accessible\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan>Error: the document does not meet PDF\u002FUA-1: the document has no title (add a &#x3C;title>); the document has no language (add `lang` to &#x3C;html>)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan>$ echo $?\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan>1\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Ch2 id=\"examples\">Examples\u003Ca class=\"f-doc-anchor\" href=\"#examples\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>A PDF with fonts of your own:\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.html\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> -o\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.pdf\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --font-dir\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> resources\u002Ffonts\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>A document whose style sheets and images lie in a parent directory (\u003Ccode>..\u002Fcss\u002Fprint.css\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> resources\u002Fpdf\u002Finvoice.html\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> -o\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.pdf\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --root\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> resources\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>An archivable PDF with a file attached:\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> report.html\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> -o\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> report.pdf\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --pdfa\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> 3b\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --attach\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> data.csv\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>A ZUGFeRD \u002F Factur-X invoice that is also accessible, with a fixed date:\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.html\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> -o\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.pdf\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#79C0FF\">  --factur-x\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.xml\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --pdfa\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> 3a\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --accessible\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#79C0FF\">  --created\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> 2026-11-01T08:00:00Z\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>A check in a build job that fails on any ignored CSS or missing resource:\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> template.html\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> -o\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> \u002Ftmp\u002Ftemplate.pdf\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --strict\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>How long each phase takes, as the median of 20 runs:\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\">$\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.html\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> -o\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.pdf\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --timings\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> --repeat\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> 20\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:2ch;text-indent:-2ch\">\u003Cspan style=\"color:#FFA657\">1\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> pages,\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> median\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> 1.77\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> ms\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> (parse \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">0.03,\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> style\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> 0.79,\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> layout\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> 0.24,\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> paint\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> 0.02,\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> pdf\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> 0.49\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>The phase times are those of the last run. Each \u003Ccode>fagus render\u003C\u002Fcode> starts a new process that loads\nits fonts first; the PHP package keeps one worker running, which is faster when you render many\ndocuments.\u003C\u002Fp>\n\u003Ch2 id=\"threads\">Threads\u003Ca class=\"f-doc-anchor\" href=\"#threads\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The binary compresses the PDF on two threads while it draws the pages. The environment variable\n\u003Ccode>RAYON_NUM_THREADS\u003C\u002Fcode> sets another number:\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:#E6EDF3\">RAYON_NUM_THREADS\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">1\u003C\u002Fspan>\u003Cspan style=\"color:#FFA657\"> fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> render\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.html\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\"> -o\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> invoice.pdf\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Ch2 id=\"the-worker\">The worker\u003Ca class=\"f-doc-anchor\" href=\"#the-worker\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\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\">fagus\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\"> worker\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> [OPTIONS]\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>fagus worker\u003C\u002Fcode> renders documents for another program: it reads requests from standard input and\nwrites PDFs to standard output, in the binary frames of \u003Ca href=\"\u002Fdocs\u002Fprotocol\">protocol.md\u003C\u002Fa>, until its\ninput closes. The PHP package starts it and talks to it; it is not meant to be used by hand. Write\na client of your own only to use Fagus from another language.\u003C\u002Fp>\n\u003Ctable class=\"f-doc-table f-stack-table\">\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Option\u003C\u002Fth>\n\u003Cth>Default\u003C\u002Fth>\n\u003Cth>Description\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--font-dir &lt;DIR&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">A directory with font files, as for \u003Ccode>render\u003C\u002Fcode>; repeatable\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--system-fonts\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">off\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">Use the fonts installed on the machine too\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--locale &lt;TAG&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The language of the texts of form controls, as for \u003Ccode>render\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--sans-serif &lt;FAMILY&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The family used for \u003Ccode>sans-serif\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--serif &lt;FAMILY&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The family used for \u003Ccode>serif\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>--monospace &lt;FAMILY&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Default\">none\u003C\u002Ftd>\n\u003Ctd data-label=\"Description\">The family used for \u003Ccode>monospace\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Everything else (PDF\u002FA, attachments, resources, the creation date) comes with each request. The\nworker ends with exit code 0 when its input closes, and with 1 when it reads a frame that breaks\nthe protocol.\u003C\u002Fp>\n",[85,89,92,95,98,101,104],{"id":86,"text":87,"level":88},"get-the-binary","Get the binary",2,{"id":90,"text":91,"level":88},"render-an-html-file","Render an HTML file",{"id":93,"text":94,"level":88},"read-and-write","Read and write",{"id":96,"text":97,"level":88},"exit-codes","Exit codes",{"id":99,"text":100,"level":88},"examples","Examples",{"id":102,"text":103,"level":88},"threads","Threads",{"id":105,"text":106,"level":88},"the-worker","The worker","https:\u002F\u002Fgithub.com\u002Fnforst\u002Ffagus\u002Fedit\u002Fmain\u002Fdocs\u002Fcli.md","https:\u002F\u002Fgithub.com\u002Fnforst\u002Ffagus\u002Fblob\u002Fv0.1.0\u002Fdocs\u002Fcli.md","\u002Fdocs\u002Fcli.md",{"slug":53,"title":54},{"slug":59,"title":60}]