[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"docs:next\u002Fprotocol":3},{"versions":4,"version":13,"nav":16,"path":65,"page":86},[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":11,"label":12,"prefix":11,"channel":11,"base":14,"ref":15},"\u002Fdocs\u002Fnext","main",[17,21,24,27,30,33,36,39,42,46,49,52,55,58,61,64,68,71,74,77,80,83],{"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":20},"ai-assistants","Docs for AI assistants",{"slug":43,"title":44,"group":45},"css","CSS reference","Reference",{"slug":47,"title":48,"group":45},"paged-media","Paged media",{"slug":50,"title":51,"group":45},"fonts","Fonts",{"slug":53,"title":54,"group":45},"extensions","Extensions",{"slug":56,"title":57,"group":45},"pdf","The PDF",{"slug":59,"title":60,"group":45},"cli","Command line",{"slug":62,"title":63,"group":45},"rust","Rust library",{"slug":65,"title":66,"group":67},"protocol","Worker protocol","Internals",{"slug":69,"title":70,"group":67},"releasing","Releasing",{"slug":72,"title":73,"group":67},"adr","Architecture decisions",{"slug":75,"title":76,"group":67,"parent":73},"adr\u002F0001-record-architecture-decisions","1. Record architecture decisions",{"slug":78,"title":79,"group":67,"parent":73},"adr\u002F0002-rust-and-fragmentation-in-layout","2. Rust core with fragmentation inside layout",{"slug":81,"title":82,"group":67,"parent":73},"adr\u002F0003-css-parsing-and-own-selector-matching","3. lightningcss for parsing, own selector matching and cascade",{"slug":84,"title":85,"group":67,"parent":73},"adr\u002F0004-extensions-only-where-css-has-no-way","4. Extensions only where CSS has no way",{"title":66,"seoTitle":87,"seoDescription":88,"html":89,"headings":90,"editUrl":106,"sourceUrl":107,"markdownUrl":108,"prev":109,"next":110},"Worker protocol · Fagus docs","fagus worker renders documents for a caller over standard input and output. One process serves any number of documents one after another, with fonts loaded and caches warm, so a document costs the time it takes to …","\u003Ch1 id=\"worker-protocol\">Worker protocol\u003C\u002Fh1>\n\u003Cp>\u003Ccode>fagus worker\u003C\u002Fcode> renders documents for a caller over standard input and output. One process serves\nany number of documents one after another, with fonts loaded and caches warm, so a document costs\nthe time it takes to render it and nothing more. The PHP package uses this protocol; any other\nlanguage can too.\u003C\u002Fp>\n\u003Ch2 id=\"frames\">Frames\u003Ca class=\"f-doc-anchor\" href=\"#frames\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Every message is a frame:\u003C\u002Fp>\n\u003Ctable class=\"f-doc-table f-stack-table\">\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Bytes\u003C\u002Fth>\n\u003Cth>Content\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>4\u003C\u002Ftd>\n\u003Ctd data-label=\"Content\">length of the rest of the frame, unsigned, little-endian\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>1\u003C\u002Ftd>\n\u003Ctd data-label=\"Content\">message type\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>4\u003C\u002Ftd>\n\u003Ctd data-label=\"Content\">length of the JSON header, unsigned, little-endian\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>n\u003C\u002Ftd>\n\u003Ctd data-label=\"Content\">JSON header (UTF-8)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>…\u003C\u002Ftd>\n\u003Ctd data-label=\"Content\">data blocks, one after another\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>The header's \u003Ccode>blobs\u003C\u002Fcode> array lists the lengths of the data blocks that follow it; frames without\ndata have no \u003Ccode>blobs\u003C\u002Fcode>. Data travels as raw bytes, never base64. Frames are at most 1 GiB. A frame\nthe worker cannot read (too long, a header that is not JSON, data blocks longer than the frame)\nends the worker with exit code 1 and the reason on its error output.\u003C\u002Fp>\n\u003Ch2 id=\"messages\">Messages\u003Ca class=\"f-doc-anchor\" href=\"#messages\" 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>Type\u003C\u002Fth>\n\u003Cth>Direction\u003C\u002Fth>\n\u003Cth>Header\u003C\u002Fth>\n\u003Cth>Data\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>H\u003C\u002Fcode> hello\u003C\u002Ftd>\n\u003Ctd data-label=\"Direction\">worker → caller\u003C\u002Ftd>\n\u003Ctd data-label=\"Header\">\u003Ccode>protocol\u003C\u002Fcode>, \u003Ccode>version\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Data\">–\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>R\u003C\u002Fcode> render\u003C\u002Ftd>\n\u003Ctd data-label=\"Direction\">caller → worker\u003C\u002Ftd>\n\u003Ctd data-label=\"Header\">the document, see below\u003C\u002Ftd>\n\u003Ctd data-label=\"Data\">HTML, stylesheets, resources, attachments, invoice XML\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>?\u003C\u002Fcode> ask\u003C\u002Ftd>\n\u003Ctd data-label=\"Direction\">worker → caller\u003C\u002Ftd>\n\u003Ctd data-label=\"Header\">\u003Ccode>id\u003C\u002Fcode>, \u003Ccode>url\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Data\">–\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>r\u003C\u002Fcode> resource\u003C\u002Ftd>\n\u003Ctd data-label=\"Direction\">caller → worker\u003C\u002Ftd>\n\u003Ctd data-label=\"Header\">\u003Ccode>found\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Data\">the resource, if found\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>P\u003C\u002Fcode> PDF\u003C\u002Ftd>\n\u003Ctd data-label=\"Direction\">worker → caller\u003C\u002Ftd>\n\u003Ctd data-label=\"Header\">\u003Ccode>id\u003C\u002Fcode>, \u003Ccode>pages\u003C\u002Fcode>, \u003Ccode>diagnostics\u003C\u002Fcode>, \u003Ccode>timings\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Data\">the PDF\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>E\u003C\u002Fcode> error\u003C\u002Ftd>\n\u003Ctd data-label=\"Direction\">worker → caller\u003C\u002Ftd>\n\u003Ctd data-label=\"Header\">\u003Ccode>id\u003C\u002Fcode> (if known), \u003Ccode>message\u003C\u002Fcode>, \u003Ccode>diagnostics\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Data\">–\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>F\u003C\u002Fcode> font\u003C\u002Ftd>\n\u003Ctd data-label=\"Direction\">caller → worker\u003C\u002Ftd>\n\u003Ctd data-label=\"Header\">–\u003C\u002Ftd>\n\u003Ctd data-label=\"Data\">a font file (TTF, OTF, TTC, WOFF, WOFF2)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>K\u003C\u002Fcode> done\u003C\u002Ftd>\n\u003Ctd data-label=\"Direction\">worker → caller\u003C\u002Ftd>\n\u003Ctd data-label=\"Header\">\u003Ccode>faces\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd data-label=\"Data\">–\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>The worker sends \u003Ccode>H\u003C\u002Fcode> when it starts; its \u003Ccode>protocol\u003C\u002Fcode> is 1 and its \u003Ccode>version\u003C\u002Fcode> that of the binary.\nA caller that does not know the protocol version stops there. The worker ends with\nexit code 0 when its input closes. A message of an unknown type gets an \u003Ccode>E\u003C\u002Fcode> without \u003Ccode>id\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch3 id=\"rendering\">Rendering\u003Ca class=\"f-doc-anchor\" href=\"#rendering\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>The caller sends \u003Ccode>R\u003C\u002Fcode> and reads frames until it gets \u003Ccode>P\u003C\u002Fcode> or \u003Ccode>E\u003C\u002Fcode>. Meanwhile the worker may ask for\nresources it needs with \u003Ccode>?\u003C\u002Fcode>, if the request allows it (\u003Ccode>ask\u003C\u002Fcode>); the caller answers each one with\n\u003Ccode>r\u003C\u002Fcode>, with the data or \u003Ccode>found: false\u003C\u002Fcode>. Nothing else may come in between.\u003C\u002Fp>\n\u003Cp>The header of \u003Ccode>R\u003C\u002Fcode>; fields other than \u003Ccode>id\u003C\u002Fcode> and \u003Ccode>html\u003C\u002Fcode> may be left out:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>json\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\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"id\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">1\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"html\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">0\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"xhtml\"\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:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"base\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"\u002Fapp\u002Fresources\u002Fpdf\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"root\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"\u002Fapp\u002Fresources\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"stylesheets\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: [{ \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"name\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"app.css\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"blob\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">1\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> }],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"resources\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: [{ \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"url\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"logo.png\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"blob\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">2\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> }],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"ask\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">true\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"conformance\"\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:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"tagged\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">true\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"accessible\"\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:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"attachments\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: [{ \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"name\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"data.csv\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"mime\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"text\u002Fcsv\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"relationship\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"supplement\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"description\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"Rohdaten\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"blob\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">3\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> }],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"facturX\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: { \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"blob\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">4\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"profile\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"en16931\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"created\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"2026-11-02T12:00:00Z\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"blobs\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: [\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">5120\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">812\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">20431\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">96\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">4187\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\u003Cul>\n\u003Cli>\u003Ccode>html\u003C\u002Fcode>, \u003Ccode>blob\u003C\u002Fcode>: the index of a data block. The HTML and style sheets must be UTF-8.\u003C\u002Fli>\n\u003Cli>\u003Ccode>xhtml\u003C\u002Fcode>: whether the markup is XHTML, parsed as XML as browsers parse \u003Ccode>.xhtml\u003C\u002Fcode> files (\u003Ccode>false\u003C\u002Fcode>\nif left out).\u003C\u002Fli>\n\u003Cli>\u003Ccode>base\u003C\u002Fcode>: the directory that relative URLs resolve against; files are read from there (and from\n\u003Ccode>root\u003C\u002Fcode>, if given, which must contain it). URLs that start with \u003Ccode>\u002F\u003C\u002Fcode> resolve against \u003Ccode>root\u003C\u002Fcode> (or\n\u003Ccode>base\u003C\u002Fcode>), as on a web server. Without \u003Ccode>base\u003C\u002Fcode> the worker reads no files.\u003C\u002Fli>\n\u003Cli>\u003Ccode>resources\u003C\u002Fcode>: data the document may use, by URL as written in the document. The documents of\nframes (\u003Ccode>&lt;iframe src&gt;\u003C\u002Fcode>, \u003Ccode>&lt;object data&gt;\u003C\u002Fcode>) ask for their resources by their URLs resolved against\nthe frame's URL, relative to the document (\u003Ccode>sub\u002Fstyle.css\u003C\u002Fcode> for \u003Ccode>style.css\u003C\u002Fcode> in \u003Ccode>sub\u002Fpage.html\u003C\u002Fcode>).\u003C\u002Fli>\n\u003Cli>\u003Ccode>stylesheets\u003C\u002Fcode>: style sheets added after those of the document; \u003Ccode>name\u003C\u002Fcode> is the source that\ndiagnostics name.\u003C\u002Fli>\n\u003Cli>\u003Ccode>ask\u003C\u002Fcode>: whether the worker asks for resources it does not have (\u003Ccode>false\u003C\u002Fcode> if left out). A resource\nis looked for as a \u003Ccode>data:\u003C\u002Fcode> URL, in \u003Ccode>resources\u003C\u002Fcode>, by asking the caller, then as a file, in that\norder.\u003C\u002Fli>\n\u003Cli>\u003Ccode>conformance\u003C\u002Fcode>: \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> for PDF\u002FA.\u003C\u002Fli>\n\u003Cli>\u003Ccode>tagged\u003C\u002Fcode>: whether the PDF is tagged, with the logical structure of the document (\u003Ccode>true\u003C\u002Fcode> if\nleft out).\u003C\u002Fli>\n\u003Cli>\u003Ccode>accessible\u003C\u002Fcode>: whether the PDF conforms to PDF\u002FUA-1 (and is tagged). The document needs a\ntitle, a language and alternative text for every image; otherwise the answer is \u003Ccode>E\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Ccode>attachments\u003C\u002Fcode>: \u003Ccode>name\u003C\u002Fcode> and \u003Ccode>mime\u003C\u002Fcode> are required. \u003Ccode>relationship\u003C\u002Fcode> is \u003Ccode>source\u003C\u002Fcode>, \u003Ccode>data\u003C\u002Fcode>,\n\u003Ccode>alternative\u003C\u002Fcode>, \u003Ccode>supplement\u003C\u002Fcode> or \u003Ccode>unspecified\u003C\u002Fcode> (\u003Ccode>unspecified\u003C\u002Fcode> if left out). \u003Ccode>description\u003C\u002Fcode> may be\nleft out (or be \u003Ccode>null\u003C\u002Fcode> or empty): PDF\u002FA-3 and PDF\u002FUA require one, so the worker then describes\nthe file by its \u003Ccode>name\u003C\u002Fcode>, as \u003Ccode>fagus render --attach\u003C\u002Fcode> does.\u003C\u002Fli>\n\u003Cli>\u003Ccode>facturX\u003C\u002Fcode>: the invoice XML of a ZUGFeRD or Factur-X invoice; \u003Ccode>profile\u003C\u002Fcode> (\u003Ccode>minimum\u003C\u002Fcode>, \u003Ccode>basicwl\u003C\u002Fcode>,\n\u003Ccode>basic\u003C\u002Fcode>, \u003Ccode>en16931\u003C\u002Fcode>, \u003Ccode>extended\u003C\u002Fcode>, \u003Ccode>xrechnung\u003C\u002Fcode>) is read from the XML if left out (\u003Ccode>en16931\u003C\u002Fcode> if\nthe XML declares none).\u003C\u002Fli>\n\u003Cli>\u003Ccode>created\u003C\u002Fcode>: the creation date, as \u003Ccode>2026-11-02T12:00:00Z\u003C\u002Fcode> or with an offset from UTC\n(\u003Ccode>2026-11-02T13:00:00+01:00\u003C\u002Fcode>), which the worker applies; the current time if left out. A date\nwithout an offset is taken as UTC.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>A request the worker cannot use (a missing data block, an unknown PDF\u002FA level, relationship or\nprofile, an invalid date) is answered with \u003Ccode>E\u003C\u002Fcode> and its reason, as is a document that does not\nmeet PDF\u002FA or PDF\u002FUA.\u003C\u002Fp>\n\u003Cp>The header of \u003Ccode>P\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cdiv class=\"f-doc-code\">\u003Cdiv class=\"f-doc-code-bar\">\u003Cspan>json\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\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"id\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">1\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"pages\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">3\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"diagnostics\"\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>\u003Cspan style=\"color:#7EE787\">\"severity\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"warning\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"code\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"css.unknown-property\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"message\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"unknown property `colr`; the declaration is ignored\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"source\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"&#x3C;style> 1\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"line\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">12\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"column\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">3\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#E6EDF3\">  ],\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"timings\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: { \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"parse\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">0.12\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"style\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">0.31\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"layout\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">0.44\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"paint\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">0.02\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#7EE787\">\"pdf\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">0.71\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\" style=\"padding-left:4ch;text-indent:-4ch\">\u003Cspan style=\"color:#7EE787\">  \"blobs\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: [\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">48213\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>Times are in milliseconds. \u003Ccode>severity\u003C\u002Fcode> is \u003Ccode>info\u003C\u002Fcode>, \u003Ccode>warning\u003C\u002Fcode> or \u003Ccode>error\u003C\u002Fcode>; \u003Ccode>line\u003C\u002Fcode> and \u003Ccode>column\u003C\u002Fcode> are 0\nwhen unknown.\u003C\u002Fp>\n\u003Cp>The header of \u003Ccode>E\u003C\u002Fcode> has the \u003Ccode>message\u003C\u002Fcode> and a \u003Ccode>diagnostics\u003C\u002Fcode> array of the same form. For a document\nthat could not be rendered (it does not meet PDF\u002FA or PDF\u002FUA, or the PDF could not be written),\nit holds the diagnostics found until then, which often explain the failure; for a request the\nworker cannot use, an \u003Ccode>F\u003C\u002Fcode> it cannot read and a message of an unknown type, it is empty.\u003C\u002Fp>\n\u003Ch3 id=\"fonts\">Fonts\u003Ca class=\"f-doc-anchor\" href=\"#fonts\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>\u003Ccode>F\u003C\u002Fcode> adds a font to the worker for all later documents; the worker answers with \u003Ccode>K\u003C\u002Fcode> and the number\nof faces it found, or \u003Ccode>E\u003C\u002Fcode> (without \u003Ccode>id\u003C\u002Fcode>). Fonts can also be given on the command line\n(\u003Ccode>fagus worker --font-dir fonts\u003C\u002Fcode>, and \u003Ccode>--system-fonts\u003C\u002Fcode> for the fonts installed on the machine) or\ncome with a document through \u003Ccode>@font-face\u003C\u002Fcode>. \u003Ccode>--sans-serif\u003C\u002Fcode>, \u003Ccode>--serif\u003C\u002Fcode> and \u003Ccode>--monospace\u003C\u002Fcode> name the\nfamilies of the generic families.\u003C\u002Fp>\n\u003Ch3 id=\"language-of-form-controls\">Language of form controls\u003Ca class=\"f-doc-anchor\" href=\"#language-of-form-controls\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>\u003Ccode>fagus worker --locale de-DE\u003C\u002Fcode> sets the language of the texts form controls show of their own\n(button labels, the placeholders and formats of date fields) in documents that give a control no\n\u003Ccode>lang\u003C\u002Fcode>; without it they are American English, as in Chrome by default. Text without \u003Ccode>lang\u003C\u002Fcode> is\nshaped in that language as well, as Chrome shapes it in the language of its user interface.\u003C\u002Fp>\n",[91,95,98,102,103],{"id":92,"text":93,"level":94},"frames","Frames",2,{"id":96,"text":97,"level":94},"messages","Messages",{"id":99,"text":100,"level":101},"rendering","Rendering",3,{"id":50,"text":51,"level":101},{"id":104,"text":105,"level":101},"language-of-form-controls","Language of form controls","https:\u002F\u002Fgithub.com\u002Fnforst\u002Ffagus\u002Fedit\u002Fmain\u002Fdocs\u002Fprotocol.md","https:\u002F\u002Fgithub.com\u002Fnforst\u002Ffagus\u002Fblob\u002Fmain\u002Fdocs\u002Fprotocol.md","\u002Fdocs\u002Fnext\u002Fprotocol.md",{"slug":62,"title":63},{"slug":69,"title":70}]