{"id":18354,"date":"2026-10-14T11:47:57","date_gmt":"2026-10-14T08:47:57","guid":{"rendered":"https:\/\/docnova.ai\/?page_id=18354"},"modified":"2026-10-23T09:24:49","modified_gmt":"2026-10-23T06:24:49","slug":"pdf-zu-faktur-x-konverter","status":"publish","type":"page","link":"https:\/\/docnova.ai\/de\/pdf-to-factur-x-converter\/","title":{"rendered":"PDF zu Factur-X Converter"},"content":{"rendered":"\n<div class=\"wp-block-group alignfull has-background is-layout-constrained wp-container-core-group-is-layout-04f4981e wp-block-group-is-layout-constrained\" style=\"background-color:#f7fbfa;padding-top:64px;padding-right:24px;padding-bottom:56px;padding-left:24px\">\n\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-f28a4fa3 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:56%\"><p class=\"wp-block-paragraph\" style=\"color:#1f9a72;font-size:13px;font-weight:700\">Free PDF to Factur-X converter<\/p><h1 class=\"wp-block-heading\" style=\"margin-top:0;margin-bottom:18px;font-size:50px\">Convert your PDF invoice to Factur-X.<\/h1><p class=\"wp-block-paragraph\" style=\"color:#536574;font-size:18px\">Upload the PDF invoice you already send, enter the invoice data, and download a Factur-X file: your PDF with structured EN 16931 invoice data embedded.<\/p><p class=\"wp-block-paragraph\" style=\"color:#2b3c48;font-size:14px;font-weight:600\">1. Upload PDF &nbsp;&nbsp; 2. Fill in invoice fields &nbsp;&nbsp; 3. Validate &nbsp;&nbsp; 4. Download Factur-X<\/p><div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\"><div class=\"wp-block-button\"><a class=\"wp-block-button__link has-text-color has-background wp-element-button\" href=\"#convert\" style=\"border-radius:9px;color:#ffffff;background-color:#1f9a72\">Start converting<\/a><\/div><\/div><p class=\"wp-block-paragraph\" style=\"color:#6e7e89;font-size:14px\">Want to skip manual entry? <a href=\"https:\/\/portal.docnova.ai\/?source=facturx-converter&amp;intent=ocr\"><strong>Let Docnova OCR fill the fields<\/strong><\/a><\/p><\/div>\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:44%\"><div class=\"wp-block-group has-border-color has-background is-layout-constrained wp-container-core-group-is-layout-5f2bafb7 wp-block-group-is-layout-constrained\" style=\"border-color:#dce9e4;border-width:1px;border-radius:20px;background-color:#ffffff;padding-top:26px;padding-right:26px;padding-bottom:26px;padding-left:26px\"><h3 class=\"wp-block-heading\" style=\"margin-top:0;margin-bottom:10px;font-size:22px\">What you get<\/h3><ul class=\"wp-block-list\"><li>Your original PDF, looking exactly the same<\/li><li>Structured invoice data embedded as factur-x.xml (EN 16931 profile)<\/li><li>Required-field and VAT checks before you download<\/li><li>An optional XML-only download for your accounting software<\/li><\/ul><\/div><\/div>\n<\/div>\n\n<\/div>\n\n\n\n<div id=\"convert\" class=\"wp-block-group alignfull is-layout-constrained wp-container-core-group-is-layout-b7b898ba wp-block-group-is-layout-constrained\" style=\"padding-top:64px;padding-right:24px;padding-bottom:40px;padding-left:24px\">\n<p class=\"has-text-align-center wp-block-paragraph\" style=\"color:#1f9a72;font-size:13px;font-weight:700\">Free converter<\/p><h2 class=\"wp-block-heading has-text-align-center\" style=\"margin-top:8px;margin-bottom:8px;font-size:38px\">Your PDF on the left. Factur-X fields on the right.<\/h2><p class=\"has-text-align-center wp-block-paragraph\" style=\"color:#6a7985;font-size:16px\">Upload your invoice, use it as a reference while you fill in the fields, then validate and download.<\/p>\n<div id=\"dnfx\">\n<style>\n#dnfx{--g:#1f9a72;--gd:#167453;--gl:#eef8f4;--ink:#1d2d38;--mut:#6a7985;--line:#dfe7e4;--err:#c0392b;--errl:#fdf1ef;color:var(--ink);font-size:15px;line-height:1.5}\n#dnfx *{box-sizing:border-box}\n#dnfx [hidden]{display:none!important}\n#dnfx .dz{border:2px dashed #71c5a8;border-radius:16px;padding:44px 20px;text-align:center;background:#fbfefd;cursor:pointer;transition:background .15s,border-color .15s}\n#dnfx .dz.over{background:var(--gl);border-color:var(--g)}\n#dnfx .dz:focus-visible{outline:3px solid var(--g);outline-offset:3px}\n#dnfx .dz-ic{font-size:34px;line-height:1;color:var(--g);margin-bottom:10px}\n#dnfx .dz-t{font-weight:600;font-size:17px;margin-bottom:4px}\n#dnfx .dz-s{font-size:13px;color:var(--mut)}\n#dnfx .dz-btn{display:inline-block;margin-top:14px;padding:10px 18px;border-radius:9px;background:var(--g);color:#fff;font-weight:600;font-size:14px}\n#dnfx .msg{margin-top:12px;padding:11px 14px;border-radius:10px;font-size:13px}\n#dnfx .msg.err{background:var(--errl);color:var(--err);border:1px solid #f3c9c2}\n#dnfx .msg.info{background:#f2f6fb;color:#2c4a66;border:1px solid #d6e2ee}\n#dnfx .work{display:grid;grid-template-columns:44% 1fr;gap:24px;align-items:start}\n#dnfx .pv{position:sticky;top:90px;background:#f1f4f6;border:1px solid var(--line);border-radius:18px;padding:16px}\n#dnfx .pv-h{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px;font-size:13px}\n#dnfx .pv-n{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n#dnfx .pv-a{display:flex;gap:12px;flex-shrink:0}\n#dnfx .lnk{background:none;border:0;padding:0;color:var(--gd);font-weight:600;font-size:13px;cursor:pointer;text-decoration:underline}\n#dnfx .pv iframe{width:100%;height:720px;border:0;border-radius:8px;background:#fff}\n#dnfx .fm{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px}\n#dnfx .ocr{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;background:#0f2b46;color:#e4edf1;border-radius:12px;padding:14px 16px;margin-bottom:18px;font-size:14px}\n#dnfx .ocr b{color:#fff}\n#dnfx .ocr a{background:#2db486;color:#fff;text-decoration:none;font-weight:600;padding:9px 14px;border-radius:8px;font-size:13px;white-space:nowrap}\n#dnfx .req-n{font-size:13px;color:var(--mut);margin:0 0 4px}\n#dnfx fieldset{border:0;padding:0;margin:0 0 6px}\n#dnfx legend{font-weight:700;font-size:15px;padding:18px 0 10px;border-bottom:1px solid var(--line);width:100%;margin-bottom:12px}\n#dnfx .gr{display:grid;grid-template-columns:1fr 1fr;gap:12px}\n#dnfx .gr3{display:grid;grid-template-columns:1fr 1.2fr 1fr;gap:12px}\n#dnfx .full{grid-column:1\/-1}\n#dnfx label.f{display:block;font-size:12.5px;font-weight:600}\n#dnfx .f input,#dnfx .f select,#dnfx .f textarea{display:block;width:100%;margin-top:5px;padding:10px;border:1px solid #cfd9d5;border-radius:8px;font:inherit;font-size:14px;background:#fff;color:var(--ink)}\n#dnfx .f input:focus,#dnfx .f select:focus,#dnfx .f textarea:focus{outline:2px solid var(--g);outline-offset:0;border-color:var(--g)}\n#dnfx .hint{display:block;font-weight:400;color:var(--mut);font-size:12px;margin-top:3px}\n#dnfx .inv input,#dnfx .inv select,#dnfx .inv textarea{border-color:var(--err);background:var(--errl)}\n#dnfx .inv .emsg{display:block;color:var(--err);font-weight:500;font-size:12px;margin-top:3px}\n#dnfx .emsg{display:none}\n#dnfx .ck{display:flex;gap:8px;align-items:flex-start;font-size:13.5px;font-weight:500}\n#dnfx .ck input{margin-top:3px;accent-color:var(--g)}\n#dnfx .ln{border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:10px;background:#fbfcfc}\n#dnfx .ln-h{display:flex;justify-content:space-between;font-size:12px;font-weight:700;color:var(--mut);margin-bottom:8px}\n#dnfx .ln-g{display:grid;grid-template-columns:.8fr 1fr 1fr 1.3fr .8fr;gap:10px;margin-top:10px}\n#dnfx .ln-tot{text-align:right;font-size:13px;margin-top:8px;color:var(--mut)}\n#dnfx .ln-tot b{color:var(--ink)}\n#dnfx .add{border:1px dashed var(--g);background:#fff;color:var(--gd);font-weight:600;border-radius:9px;padding:10px;width:100%;cursor:pointer;font:inherit;font-size:14px}\n#dnfx .tot{margin-top:16px;border-radius:12px;background:var(--gl);border:1px solid #cde8dc;padding:14px 16px;font-size:14px}\n#dnfx .tot table{width:100%;border-collapse:collapse}\n#dnfx .tot td{padding:3px 0}\n#dnfx .tot td:last-child{text-align:right;font-variant-numeric:tabular-nums}\n#dnfx .tot .gt td{border-top:1px solid #b9dccd;padding-top:8px;font-weight:700;font-size:16px}\n#dnfx .tot .vb td{color:var(--mut);font-size:13px}\n#dnfx .es{margin-top:16px;padding:14px 16px;border-radius:10px;background:var(--errl);border:1px solid #f3c9c2;color:var(--err);font-size:13px}\n#dnfx .es ul{margin:6px 0 0;padding-left:18px}\n#dnfx .es a{color:var(--err)}\n#dnfx .go{margin-top:16px;width:100%;border:0;border-radius:9px;background:var(--g);color:#fff;padding:14px;font:inherit;font-weight:700;font-size:15px;cursor:pointer}\n#dnfx .go:hover{background:var(--gd)}\n#dnfx .go:disabled{opacity:.6;cursor:wait}\n#dnfx .rs{background:var(--gl);border:1px solid #9ed8c2;border-radius:18px;padding:28px}\n#dnfx .rs h3{margin:0 0 6px;font-size:24px}\n#dnfx .rs p{margin:0 0 18px;color:var(--mut)}\n#dnfx .rs-a{display:flex;flex-wrap:wrap;gap:10px}\n#dnfx .b1,#dnfx .b2{display:inline-block;padding:12px 18px;border-radius:9px;font-weight:600;font-size:14px;text-decoration:none;cursor:pointer;border:0;font-family:inherit}\n#dnfx .b1{background:var(--g);color:#fff}\n#dnfx .b2{background:#fff;color:var(--gd);border:1px solid #9ed8c2}\n#dnfx .send{margin-top:20px;padding-top:18px;border-top:1px solid #b9dccd;font-size:14px}\n#dnfx .send a{color:var(--gd);font-weight:700}\n@media (max-width:900px){#dnfx .work{grid-template-columns:1fr}#dnfx .pv{position:static}#dnfx .pv iframe{height:460px}}\n@media (max-width:560px){#dnfx .gr,#dnfx .gr3{grid-template-columns:1fr}#dnfx .ln-g{grid-template-columns:1fr 1fr}#dnfx .fm{padding:16px}}\n@media (prefers-reduced-motion:reduce){#dnfx *{transition:none!important}}\n#dnfx .fr-fields{display:grid;gap:18px}#dnfx .fr-required-note{margin-bottom:16px}#dnfx .fr-statements textarea{min-height:76px;resize:vertical}#dnfx .fr-statements .emsg{margin-top:6px}\n\nbody.page-id-18354 .entry-content .wp-block-button .wp-block-button__link{border:0!important;border-color:transparent!important;box-shadow:none!important}\nbody.page-id-18354 .entry-content .wp-block-button .wp-block-button__link:focus-visible{outline:2px solid #1f9a72!important;outline-offset:3px}\n<\/style>\n<div data-s=\"up\">\n<div class=\"dz\" tabindex=\"0\" role=\"button\" aria-label=\"Upload your PDF invoice\">\n<div class=\"dz-ic\" aria-hidden=\"true\">&#8593;<\/div>\n<div class=\"dz-t\">Drag and drop your PDF invoice here<\/div>\n<div class=\"dz-s\">PDF only, up to 20 MB<\/div>\n<span class=\"dz-btn\">Choose a PDF<\/span>\n<\/div>\n<input type=\"file\" accept=\"application\/pdf,.pdf\" data-v=\"file\" hidden>\n<div class=\"msg err\" data-e=\"up\" hidden><\/div>\n<\/div>\n<div class=\"work\" data-s=\"work\" hidden>\n<div class=\"pv\">\n<div class=\"pv-h\"><span class=\"pv-n\" data-v=\"fname\"><\/span><span class=\"pv-a\"><a class=\"lnk\" data-v=\"open\" target=\"_blank\" rel=\"noopener\">Open<\/a><button type=\"button\" class=\"lnk\" data-a=\"replace\">Replace file<\/button><\/span><\/div>\n<iframe title=\"Uploaded invoice preview\" data-v=\"frame\"><\/iframe>\n<\/div>\n<form class=\"fm\" novalidate>\n<div class=\"ocr\"><span><b>Skip manual entry.<\/b> Docnova OCR fills these fields from your PDF. You just review and confirm.<\/span><a data-v=\"ocr\" href=\"#\">Fill automatically with OCR<\/a><\/div>\n<div class=\"msg info\" data-e=\"fx\" hidden>This PDF already contains Factur-X data. Creating a new file replaces the embedded XML.<\/div>\n<p class=\"req-n\">Fields marked * are required.<\/p>\n<fieldset><legend>Invoice details<\/legend>\n<div class=\"gr\">\n<label class=\"f\">Document type *<select name=\"type\"><option value=\"380\">Invoice<\/option><option value=\"381\">Credit note<\/option><\/select><\/label>\n<label class=\"f\">Invoice number *<input name=\"number\" placeholder=\"INV-2026-001\" data-r><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Invoice date *<input type=\"date\" name=\"issueDate\" data-r><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Currency *<select name=\"currency\"><option>EUR<\/option><option>USD<\/option><option>GBP<\/option><option>CHF<\/option><\/select><\/label>\n<label class=\"f\" data-show=\"381\" hidden>Original invoice number *<input name=\"preceding\"><span class=\"hint\">Number of the earlier invoice being corrected<\/span><span class=\"emsg\"><\/span><\/label><label class=\"f\" data-show=\"381\" hidden>Original invoice date *<input type=\"date\" name=\"precedingDate\"><span class=\"hint\">Issue date of the earlier invoice being corrected<\/span><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Delivery \/ service date<input type=\"date\" name=\"deliveryDate\"><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Operation type *<select name=\"opType\" data-r><option value=\"\">Select<\/option><option value=\"Goods\">Goods<\/option><option value=\"Services\">Services<\/option><option value=\"Goods and services\">Goods and services<\/option><\/select><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Buyer reference<input name=\"buyerRef\"><span class=\"hint\">Order number or service code, if the buyer asks for it<\/span><\/label>\n<label class=\"ck full\"><input type=\"checkbox\" name=\"vatDebits\"> VAT is paid on debits (option pour le paiement de la TVA d&#8217;apr&egrave;s les d&eacute;bits)<\/label>\n<\/div>\n<\/fieldset>\n<fieldset><legend>Seller<\/legend>\n<div class=\"gr\">\n<label class=\"f full\">Company name *<input name=\"s_name\" data-r autocomplete=\"organization\"><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">SIREN *<input name=\"s_siren\" inputmode=\"numeric\" placeholder=\"9 digits\" data-r><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">VAT number *<input name=\"s_vat\" placeholder=\"FR12345678901\" data-r><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Electronic address scheme<select name=\"s_scheme\"><option value=\"0225\">French invoicing address (0225)<\/option><option value=\"EM\">Email (EM)<\/option><option value=\"0088\">GLN (0088)<\/option><option value=\"0002\">SIREN (0002)<\/option><\/select><\/label>\n<label class=\"f\">Electronic invoicing address<span data-fr-required> *<\/span><input name=\"s_endpoint\" aria-required=\"true\"><span class=\"hint\">Required when the seller is in France. Use the actual registered address and matching scheme.<\/span><span class=\"emsg\"><\/span><\/label>\n<label class=\"f full\">Street address *<input name=\"s_street\" data-r><span class=\"emsg\"><\/span><\/label>\n<\/div>\n<div class=\"gr3\" style=\"margin-top:12px\">\n<label class=\"f\">Postcode *<input name=\"s_post\" data-r><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">City *<input name=\"s_city\" data-r><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Country *<select name=\"s_country\" data-c><\/select><\/label>\n<\/div>\n<\/fieldset>\n<fieldset><legend>Buyer<\/legend>\n<div class=\"gr\">\n<label class=\"f full\">Company name *<input name=\"b_name\" data-r><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">SIREN <span data-v=\"bsirenreq\">*<\/span><input name=\"b_siren\" inputmode=\"numeric\" placeholder=\"9 digits\"><span class=\"hint\">Required for buyers in France<\/span><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">VAT number<input name=\"b_vat\"><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Electronic address scheme<select name=\"b_scheme\"><option value=\"0225\">French invoicing address (0225)<\/option><option value=\"EM\">Email (EM)<\/option><option value=\"0088\">GLN (0088)<\/option><option value=\"0002\">SIREN (0002)<\/option><\/select><\/label>\n<label class=\"f\">Electronic invoicing address<span data-fr-required> *<\/span><input name=\"b_endpoint\" aria-required=\"true\"><span class=\"hint\">Required when the seller is in France. Use the actual registered address and matching scheme.<\/span><span class=\"emsg\"><\/span><\/label>\n<label class=\"f full\">Street address *<input name=\"b_street\" data-r><span class=\"emsg\"><\/span><\/label>\n<\/div>\n<div class=\"gr3\" style=\"margin-top:12px\">\n<label class=\"f\">Postcode *<input name=\"b_post\" data-r><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">City *<input name=\"b_city\" data-r><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Country *<select name=\"b_country\" data-c><\/select><\/label>\n<\/div>\n<label class=\"ck\" style=\"margin-top:14px\"><input type=\"checkbox\" name=\"d_on\"> Delivery address is different from the buyer address<\/label>\n<div data-v=\"dAddr\" hidden>\n<div class=\"gr\" style=\"margin-top:12px\"><label class=\"f full\">Delivery street address *<input name=\"d_street\"><span class=\"emsg\"><\/span><\/label><\/div>\n<div class=\"gr3\" style=\"margin-top:12px\">\n<label class=\"f\">Postcode *<input name=\"d_post\"><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">City *<input name=\"d_city\"><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">Country *<select name=\"d_country\" data-c><\/select><\/label>\n<\/div>\n<\/div>\n<\/fieldset>\n<fieldset><legend>Invoice lines<\/legend>\n<div data-v=\"lines\"><\/div>\n<button type=\"button\" class=\"add\" data-a=\"addLine\">+ Add line<\/button>\n<div data-v=\"exWrap\" hidden style=\"margin-top:14px\"><label class=\"f\">VAT exemption reason *<input name=\"exReason\" placeholder=\"Enter the applicable legal VAT exemption reason\"><span class=\"hint\">Required for exempt, reverse charge, intra-EU and export lines<\/span><span class=\"emsg\"><\/span><\/label><\/div>\n<div class=\"tot\"><table><tbody data-v=\"tot\"><\/tbody><\/table><\/div>\n<\/fieldset>\n<fieldset class=\"fr-statements\"><legend>French invoice statements<\/legend><p class=\"req-n fr-required-note\" data-v=\"frRequiredNote\">All three statements are required when the seller is in France.<\/p><div class=\"fr-fields\"><label class=\"f\">Recovery costs statement<span data-fr-required> *<\/span><textarea name=\"fr_recovery\" rows=\"2\" aria-required=\"true\"><\/textarea><span class=\"emsg\"><\/span><\/label><label class=\"f\">Late payment penalties<span data-fr-required> *<\/span><textarea name=\"fr_late\" rows=\"2\" aria-required=\"true\"><\/textarea><span class=\"emsg\"><\/span><\/label><label class=\"f\">Early payment discount or absence of discount<span data-fr-required> *<\/span><textarea name=\"fr_discount\" rows=\"2\" aria-required=\"true\"><\/textarea><span class=\"emsg\"><\/span><\/label><\/div><\/fieldset>\n<fieldset><legend>Payment<\/legend>\n<div class=\"gr\">\n<label class=\"f\">Payment method *<select name=\"p_means\"><option value=\"58\">SEPA credit transfer<\/option><option value=\"30\">Credit transfer<\/option><option value=\"59\">SEPA direct debit<\/option><option value=\"48\">Bank card<\/option><option value=\"10\">Cash<\/option><\/select><\/label>\n<label class=\"f\">Due date<input type=\"date\" name=\"dueDate\"><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\"><span data-v=\"ibanlbl\">IBAN *<\/span><input name=\"iban\" autocomplete=\"off\"><span class=\"emsg\"><\/span><\/label>\n<label class=\"f\">BIC<input name=\"bic\"><\/label>\n<label class=\"f full\">Payment terms<input name=\"terms\" placeholder=\"Payment within 30 days\"><span class=\"hint\">Enter a due date or payment terms<\/span><span class=\"emsg\"><\/span><\/label>\n<\/div>\n<\/fieldset>\n<div class=\"es\" data-v=\"es\" hidden role=\"alert\" tabindex=\"-1\"><\/div>\n<button type=\"submit\" class=\"go\" data-v=\"go\">Validate and create Factur-X<\/button>\n<\/form>\n<\/div>\n<div class=\"rs\" data-s=\"done\" hidden>\n<h3>Your Factur-X is ready<\/h3>\n<p data-v=\"rsMsg\">Your original PDF now carries the structured invoice data (factur-x.xml, EN 16931 profile).<\/p>\n<div class=\"rs-a\">\n<a class=\"b1\" data-v=\"dl\" download>Download Factur-X<\/a>\n<a class=\"b2\" data-v=\"dlx\" download>Download XML only<\/a>\n<button type=\"button\" class=\"b2\" data-a=\"restart\">Convert another invoice<\/button>\n<\/div>\n<div class=\"msg info\" data-v=\"test\" hidden>Test mode: the XML is embedded in your browser. Full PDF\/A-3 conformance is applied when the Docnova conversion service is connected.<\/div>\n<div class=\"send\">Creating the file is the first step. To send it to your customer, <a data-v=\"send\" href=\"#\">send it from the Docnova Portal<\/a>.<\/div>\n<\/div>\n<\/div>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/pdf-lib\/1.17.1\/pdf-lib.min.js\"><\/script>\n<div id=\"dnfx-js\" hidden data-js=\"(function(){\nvar CONFIG={generateEndpoint:&quot;&quot;,portalUrl:&quot;https:\/\/portal.docnova.ai\/&quot;,source:&quot;facturx-converter&quot;};\nvar root=document.getElementById(&quot;dnfx&quot;);if(!root)return;\nfunction q(s,c){return (c||root).querySelector(s)}\nfunction qa(s,c){return Array.prototype.slice.call((c||root).querySelectorAll(s))}\nfunction v(n){return q(&#039;[data-v=&quot;&#039;+n+&#039;&quot;]&#039;)}\nvar form=q(&quot;form&quot;),st={file:null,bytes:null,url:null,out:null,xurl:null};\nvar portal=CONFIG.portalUrl+(CONFIG.portalUrl.indexOf(&quot;?&quot;)&lt;0?&quot;?&quot;:&quot;&amp;&quot;)+&quot;source=&quot;+CONFIG.source;\nv(&quot;ocr&quot;).href=portal+&quot;&amp;intent=ocr&quot;;v(&quot;send&quot;).href=portal+&quot;&amp;intent=send&quot;;\nvar CC=[[&quot;FR&quot;,&quot;France&quot;],[&quot;BE&quot;,&quot;Belgium&quot;],[&quot;DE&quot;,&quot;Germany&quot;],[&quot;LU&quot;,&quot;Luxembourg&quot;],[&quot;NL&quot;,&quot;Netherlands&quot;],[&quot;IT&quot;,&quot;Italy&quot;],[&quot;ES&quot;,&quot;Spain&quot;],[&quot;PT&quot;,&quot;Portugal&quot;],[&quot;AT&quot;,&quot;Austria&quot;],[&quot;IE&quot;,&quot;Ireland&quot;],[&quot;PL&quot;,&quot;Poland&quot;],[&quot;CH&quot;,&quot;Switzerland&quot;],[&quot;GB&quot;,&quot;United Kingdom&quot;],[&quot;TR&quot;,&quot;T\\u00fcrkiye&quot;],[&quot;US&quot;,&quot;United States&quot;]];\nqa(&quot;select[data-c]&quot;).forEach(function(s){CC.forEach(function(c){var o=document.createElement(&quot;option&quot;);o.value=c[0];o.textContent=c[1];s.appendChild(o)})});\nfunction F(n){return form.elements[n]}\nfunction val(n){var e=F(n);return e?(e.type===&quot;checkbox&quot;?e.checked:String(e.value).trim()):&quot;&quot;}\nvar dz=q(&quot;.dz&quot;),fi=v(&quot;file&quot;);\nfunction upErr(m){var e=q(&#039;[data-e=&quot;up&quot;]&#039;);e.textContent=m;e.hidden=!m}\ndz.addEventListener(&quot;click&quot;,function(){fi.click()});\ndz.addEventListener(&quot;keydown&quot;,function(e){if(e.key===&quot;Enter&quot;||e.key===&quot; &quot;){e.preventDefault();fi.click()}});\n[&quot;dragenter&quot;,&quot;dragover&quot;].forEach(function(t){dz.addEventListener(t,function(e){e.preventDefault();dz.classList.add(&quot;over&quot;)})});\n[&quot;dragleave&quot;,&quot;drop&quot;].forEach(function(t){dz.addEventListener(t,function(e){e.preventDefault();dz.classList.remove(&quot;over&quot;)})});\ndz.addEventListener(&quot;drop&quot;,function(e){if(e.dataTransfer.files[0])take(e.dataTransfer.files[0])});\nfi.addEventListener(&quot;change&quot;,function(){if(fi.files[0])take(fi.files[0]);fi.value=&quot;&quot;});\nfunction take(f){\nupErr(&quot;&quot;);\nif(!\/\\.pdf$\/i.test(f.name)&amp;&amp;f.type!==&quot;application\/pdf&quot;){upErr(&quot;This file is not a PDF. Upload your invoice as a PDF file.&quot;);return}\nif(f.size&gt;20*1024*1024){upErr(&quot;This PDF is larger than 20 MB. Compress it or upload a smaller file.&quot;);return}\nreturn f.arrayBuffer().then(async function(b){\nvar u8=new Uint8Array(b),head=String.fromCharCode.apply(null,u8.subarray(0,5));\nif(head!==&quot;%PDF-&quot;){upErr(&quot;This file could not be read as a PDF. Export the invoice again and retry.&quot;);return}\nvar P=window.PDFLib;if(!P){upErr(&quot;The PDF checker is not ready. Refresh the page and try again.&quot;);return}\ntry{var checked=await P.PDFDocument.load(u8);if(checked.isEncrypted){upErr(&quot;Password-protected PDFs are not supported. Upload an unencrypted copy.&quot;);return}if(!checked.getPageCount()){upErr(&quot;This PDF has no pages. Upload an invoice PDF.&quot;);return}}catch(err){upErr(err&amp;&amp;(err instanceof P.EncryptedPDFError||err.name===&quot;EncryptedPDFError&quot;||\/encrypted\/i.test(err.message||&quot;&quot;))?&quot;Password-protected PDFs are not supported. Upload an unencrypted copy.&quot;:&quot;This file could not be read as a PDF. Export the invoice again and retry.&quot;);return}\nst.file=f;st.bytes=u8;if(st.url)URL.revokeObjectURL(st.url);st.url=URL.createObjectURL(f);\nv(&quot;fname&quot;).textContent=f.name;v(&quot;frame&quot;).src=st.url;v(&quot;open&quot;).href=st.url;\nvar tail=new TextDecoder(&quot;latin1&quot;).decode(u8);q(&#039;[data-e=&quot;fx&quot;]&#039;).hidden=!\/factur-x\\.xml|zugferd-invoice\\.xml\/i.test(tail);\nif(!val(&quot;issueDate&quot;))F(&quot;issueDate&quot;).value=new Date().toISOString().slice(0,10);\nq(&#039;[data-s=&quot;up&quot;]&#039;).hidden=true;q(&#039;[data-s=&quot;done&quot;]&#039;).hidden=true;q(&#039;[data-s=&quot;work&quot;]&#039;).hidden=false;\nq(&#039;[data-s=&quot;work&quot;]&#039;).scrollIntoView({behavior:&quot;smooth&quot;,block:&quot;start&quot;});\n}).catch(function(){upErr(&quot;This file could not be read as a PDF. Export the invoice again and retry.&quot;);})}\nq(&#039;[data-a=&quot;replace&quot;]&#039;).addEventListener(&quot;click&quot;,function(){fi.click()});\nfunction cond(){\nqa(&#039;[data-show=&quot;381&quot;]&#039;).forEach(function(e){e.hidden=val(&quot;type&quot;)!==&quot;381&quot;;});\nv(&quot;dAddr&quot;).hidden=!val(&quot;d_on&quot;);\nv(&quot;bsirenreq&quot;).hidden=val(&quot;b_country&quot;)!==&quot;FR&quot;;\nvar ib=[&quot;30&quot;,&quot;58&quot;].indexOf(val(&quot;p_means&quot;))&gt;=0;v(&quot;ibanlbl&quot;).textContent=ib?&quot;IBAN *&quot;:&quot;IBAN&quot;;\nv(&quot;go&quot;).textContent=val(&quot;type&quot;)===&quot;381&quot;?&quot;Validate and create Factur-X credit note&quot;:&quot;Validate and create Factur-X&quot;;\n}\nform.addEventListener(&quot;change&quot;,function(e){cond();if(e.target.closest(&quot;.ln&quot;)||e.target.name===&quot;currency&quot;)calc()});\nform.addEventListener(&quot;input&quot;,function(e){var l=e.target.closest(&quot;label.f&quot;);if(l&amp;&amp;l.classList.contains(&quot;inv&quot;)){l.classList.remove(&quot;inv&quot;);e.target.removeAttribute(&quot;aria-invalid&quot;)}if(e.target.closest(&quot;.ln&quot;))calc()});\nvar CATS=[[&quot;S&quot;,&quot;Standard rate&quot;],[&quot;Z&quot;,&quot;Zero rate&quot;],[&quot;E&quot;,&quot;Exempt&quot;],[&quot;AE&quot;,&quot;Reverse charge&quot;],[&quot;K&quot;,&quot;Intra-EU supply&quot;],[&quot;G&quot;,&quot;Export outside EU&quot;]];\nvar UNITS=[[&quot;C62&quot;,&quot;Unit&quot;],[&quot;XBG&quot;,&quot;Bag&quot;],[&quot;XBA&quot;,&quot;Barrel&quot;],[&quot;BLL&quot;,&quot;Barrel (US)&quot;],[&quot;XBX&quot;,&quot;Box&quot;],[&quot;CMT&quot;,&quot;Centimeter&quot;],[&quot;X1F&quot;,&quot;Container (flexible)&quot;],[&quot;XGL&quot;,&quot;Container (gallon)&quot;],[&quot;XCN&quot;,&quot;Container, not otherwise specified as transport equipment&quot;],[&quot;MTQ&quot;,&quot;Cubic Meter&quot;],[&quot;XCY&quot;,&quot;Cylinder&quot;],[&quot;H87&quot;,&quot;Each&quot;],[&quot;FOT&quot;,&quot;Foot&quot;],[&quot;GRM&quot;,&quot;Gram&quot;],[&quot;HUR&quot;,&quot;Hour&quot;],[&quot;INH&quot;,&quot;Inch&quot;],[&quot;KGM&quot;,&quot;Kilogram&quot;],[&quot;KMT&quot;,&quot;Kilometer&quot;],[&quot;KWH&quot;,&quot;Kilowatt Hour&quot;],[&quot;LTR&quot;,&quot;Liter&quot;],[&quot;MTR&quot;,&quot;Meter&quot;],[&quot;SMI&quot;,&quot;Mile&quot;],[&quot;XPK&quot;,&quot;Package&quot;],[&quot;XPX&quot;,&quot;Pallet&quot;],[&quot;E48&quot;,&quot;Service Unit&quot;],[&quot;SET&quot;,&quot;Set&quot;],[&quot;XSX&quot;,&quot;Set (XSX)&quot;],[&quot;SX&quot;,&quot;Shipment&quot;],[&quot;MTK&quot;,&quot;Square Meter&quot;],[&quot;MIK&quot;,&quot;Square Mile&quot;],[&quot;TNE&quot;,&quot;Ton&quot;],[&quot;YRD&quot;,&quot;Yard&quot;],[&quot;DAY&quot;,&quot;Day&quot;],[&quot;MON&quot;,&quot;Month&quot;]];\nfunction opts(a,sel){return a.map(function(x){return &#039;&lt;option value=&quot;&#039;+x[0]+&#039;&quot;&#039;+(x[0]===sel?&quot; selected&quot;:&quot;&quot;)+&quot;&gt;&quot;+x[1]+&quot;&lt;\/option&gt;&quot;}).join(&quot;&quot;)}\nfunction addLine(){\nvar d=document.createElement(&quot;div&quot;);d.className=&quot;ln&quot;;\nd.innerHTML=&#039;&lt;div class=&quot;ln-h&quot;&gt;&lt;span data-n&gt;&lt;\/span&gt;&lt;button type=&quot;button&quot; class=&quot;lnk&quot; data-a=&quot;rm&quot;&gt;Remove&lt;\/button&gt;&lt;\/div&gt;&#039;+\n&#039;&lt;label class=&quot;f&quot;&gt;Description *&lt;input data-l=&quot;desc&quot;&gt;&lt;span class=&quot;emsg&quot;&gt;&lt;\/span&gt;&lt;\/label&gt;&#039;+\n&#039;&lt;div class=&quot;ln-g&quot;&gt;&lt;label class=&quot;f&quot;&gt;Qty *&lt;input type=&quot;number&quot; step=&quot;any&quot; min=&quot;0&quot; value=&quot;1&quot; data-l=&quot;qty&quot;&gt;&lt;span class=&quot;emsg&quot;&gt;&lt;\/span&gt;&lt;\/label&gt;&#039;+\n&#039;&lt;label class=&quot;f&quot;&gt;Unit&lt;select data-l=&quot;unit&quot;&gt;&#039;+opts(UNITS,&quot;C62&quot;)+&#039;&lt;\/select&gt;&lt;\/label&gt;&#039;+\n&#039;&lt;label class=&quot;f&quot;&gt;Unit price (excl. VAT) *&lt;input type=&quot;number&quot; step=&quot;0.01&quot; data-l=&quot;price&quot;&gt;&lt;span class=&quot;emsg&quot;&gt;&lt;\/span&gt;&lt;\/label&gt;&#039;+\n&#039;&lt;label class=&quot;f&quot;&gt;VAT category&lt;select data-l=&quot;cat&quot;&gt;&#039;+opts(CATS,&quot;S&quot;)+&#039;&lt;\/select&gt;&lt;\/label&gt;&#039;+\n&#039;&lt;label class=&quot;f&quot;&gt;VAT %&lt;input type=&quot;number&quot; step=&quot;0.1&quot; min=&quot;0&quot; value=&quot;20&quot; data-l=&quot;rate&quot;&gt;&lt;span class=&quot;emsg&quot;&gt;&lt;\/span&gt;&lt;\/label&gt;&lt;\/div&gt;&#039;+\n&#039;&lt;div class=&quot;ln-tot&quot;&gt;Line total &lt;b data-lt&gt;0.00&lt;\/b&gt;&lt;\/div&gt;&#039;;\nv(&quot;lines&quot;).appendChild(d);renum();calc();\n}\nfunction renum(){var ls=qa(&quot;.ln&quot;);ls.forEach(function(l,i){q(&quot;[data-n]&quot;,l).textContent=&quot;Line &quot;+(i+1);q(&#039;[data-a=&quot;rm&quot;]&#039;,l).hidden=ls.length&lt;2})}\nv(&quot;lines&quot;).addEventListener(&quot;change&quot;,function(e){if(e.target.getAttribute(&quot;data-l&quot;)===&quot;cat&quot;){var l=e.target.closest(&quot;.ln&quot;),r=q(&#039;[data-l=&quot;rate&quot;]&#039;,l);if(e.target.value!==&quot;S&quot;)r.value=&quot;0&quot;;else if(!+r.value)r.value=&quot;20&quot;}});\nroot.addEventListener(&quot;click&quot;,function(e){var a=e.target.closest(&quot;[data-a]&quot;);if(!a)return;var k=a.getAttribute(&quot;data-a&quot;);\nif(k===&quot;addLine&quot;)addLine();\nif(k===&quot;rm&quot;){a.closest(&quot;.ln&quot;).remove();renum();calc()}\nif(k===&quot;restart&quot;)restart();\n});\nfunction r2(n){return Math.round((n+Number.EPSILON)*100)\/100}\nfunction num(s){var n=parseFloat(String(s).replace(&quot;,&quot;,&quot;.&quot;));return isFinite(n)?n:0}\nfunction fmt(n){return n.toFixed(2)}\nfunction lines(){return qa(&quot;.ln&quot;).map(function(l){function g(k){return q(&#039;[data-l=&quot;&#039;+k+&#039;&quot;]&#039;,l)}var qt=num(g(&quot;qty&quot;).value),p=num(g(&quot;price&quot;).value);\nreturn {el:l,g:g,desc:g(&quot;desc&quot;).value.trim(),qty:qt,unit:g(&quot;unit&quot;).value,price:p,cat:g(&quot;cat&quot;).value,rate:g(&quot;cat&quot;).value===&quot;S&quot;?num(g(&quot;rate&quot;).value):0,net:r2(qt*p)}})}\nfunction calc(){\nvar ls=lines(),cur=val(&quot;currency&quot;),b={},net=0;\nls.forEach(function(l){q(&quot;[data-lt]&quot;,l.el).textContent=fmt(l.net)+&quot; &quot;+cur;net=r2(net+l.net);var k=l.cat+&quot;|&quot;+l.rate;b[k]=b[k]||{cat:l.cat,rate:l.rate,basis:0};b[k].basis=r2(b[k].basis+l.net)});\nvar br=Object.keys(b).map(function(k){var x=b[k];x.tax=r2(x.basis*x.rate\/100);return x});\nvar tax=br.reduce(function(s,x){return r2(s+x.tax)},0),grand=r2(net+tax);\nvar cn={};CATS.forEach(function(c){cn[c[0]]=c[1]});\nvar h=&#039;&lt;tr&gt;&lt;td&gt;Total excl. VAT&lt;\/td&gt;&lt;td&gt;&#039;+fmt(net)+&quot; &quot;+cur+&quot;&lt;\/td&gt;&lt;\/tr&gt;&quot;;\nbr.forEach(function(x){h+=&#039;&lt;tr class=&quot;vb&quot;&gt;&lt;td&gt;VAT &#039;+cn[x.cat]+(x.cat===&quot;S&quot;?&quot; &quot;+x.rate+&quot;%&quot;:&quot;&quot;)+&quot; on &quot;+fmt(x.basis)+&quot;&lt;\/td&gt;&lt;td&gt;&quot;+fmt(x.tax)+&quot; &quot;+cur+&quot;&lt;\/td&gt;&lt;\/tr&gt;&quot;});\nh+=&#039;&lt;tr&gt;&lt;td&gt;Total VAT&lt;\/td&gt;&lt;td&gt;&#039;+fmt(tax)+&quot; &quot;+cur+&#039;&lt;\/td&gt;&lt;\/tr&gt;&lt;tr class=&quot;gt&quot;&gt;&lt;td&gt;Total incl. VAT&lt;\/td&gt;&lt;td&gt;&#039;+fmt(grand)+&quot; &quot;+cur+&quot;&lt;\/td&gt;&lt;\/tr&gt;&quot;;\nv(&quot;tot&quot;).innerHTML=h;\nv(&quot;exWrap&quot;).hidden=!br.some(function(x){return [&quot;E&quot;,&quot;AE&quot;,&quot;K&quot;,&quot;G&quot;].indexOf(x.cat)&gt;=0});\nreturn {lines:ls,breakdown:br,net:net,tax:tax,grand:grand};\n}\nfunction luhn(s){var t=0;for(var i=0;i&lt;s.length;i++){var d=+s[s.length-1-i];if(i%2){d*=2;if(d&gt;9)d-=9}t+=d}return t%10===0}\nfunction sirenOk(s){s=s.replace(\/\\s\/g,&quot;&quot;);return \/^\\d{9}$\/.test(s)&amp;&amp;luhn(s)}\nfunction vatOk(s){return \/^[A-Z]{2}[0-9A-Z]{2,13}$\/.test(s.replace(\/[\\s.-]\/g,&quot;&quot;).toUpperCase())}\nfunction validIBAN(value){\nvar iban=String(value).replace(\/\\s\/g,&quot;&quot;).toUpperCase();\nvar lengths={AD:24,AE:23,AL:28,AT:20,AZ:28,BA:20,BE:16,BG:22,BH:22,BR:29,BY:28,CH:21,CR:22,CY:28,CZ:24,DE:22,DK:18,DO:28,EE:20,EG:29,ES:24,FI:18,FO:18,FR:27,GB:22,GE:22,GI:23,GL:18,GR:27,GT:28,HR:21,HU:28,IE:22,IL:23,IS:26,IT:27,JO:30,KZ:20,KW:30,LB:28,LC:32,LI:21,LT:20,LU:20,LV:21,MC:27,MD:24,ME:22,MK:19,MR:27,MT:31,MU:30,NL:18,NO:15,PK:24,PL:28,PS:29,PT:25,QA:29,RO:24,RS:22,SA:24,SC:31,SE:24,SI:19,SK:24,SM:27,ST:25,SV:28,TL:23,TN:24,TR:26,UA:29,VA:22,VG:24,XK:20};\nif(!\/^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$\/.test(iban))return false;\nif(lengths[iban.slice(0,2)]&amp;&amp;iban.length!==lengths[iban.slice(0,2)])return false;\nvar moved=iban.slice(4)+iban.slice(0,4),rem=0;\nfor(var i=0;i&lt;moved.length;i++){var n=moved.charCodeAt(i),digits=n&gt;=65?String(n-55):moved.charAt(i);for(var j=0;j&lt;digits.length;j++)rem=(rem*10+Number(digits.charAt(j)))%97;}\nreturn rem===1;\n}\nfunction validate(t){\nvar errs=[];\nqa(&quot;.inv&quot;).forEach(function(l){l.classList.remove(&quot;inv&quot;)});qa(&quot;[aria-invalid]&quot;).forEach(function(e){e.removeAttribute(&quot;aria-invalid&quot;)});\nfunction bad(el,m){var l=el.closest(&quot;label.f&quot;);if(l){l.classList.add(&quot;inv&quot;);var em=q(&quot;.emsg&quot;,l);if(em)em.textContent=m}el.setAttribute(&quot;aria-invalid&quot;,&quot;true&quot;);errs.push({el:el,m:m})}\nif(val(&quot;s_country&quot;)===&quot;FR&quot;){\n[&quot;s_endpoint&quot;,&quot;b_endpoint&quot;,&quot;fr_recovery&quot;,&quot;fr_late&quot;,&quot;fr_discount&quot;].forEach(function(n){if(!val(n))bad(F(n),&quot;Enter &quot;+({s_endpoint:&quot;the seller electronic invoicing address&quot;,b_endpoint:&quot;the buyer electronic invoicing address&quot;,fr_recovery:&quot;the recovery costs statement&quot;,fr_late:&quot;the late payment penalties statement&quot;,fr_discount:&quot;the early payment discount statement&quot;})[n]+&quot;.&quot;);});\n}\n[&quot;s&quot;,&quot;b&quot;].forEach(function(p){var ep=val(p+&quot;_endpoint&quot;),scheme=val(p+&quot;_scheme&quot;);if(ep&amp;&amp;scheme===&quot;EM&quot;&amp;&amp;!\/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/.test(ep))bad(F(p+&quot;_endpoint&quot;),&quot;Enter a valid email address.&quot;);\nif(ep&amp;&amp;scheme===&quot;0225&quot;&amp;&amp;!\/^\\d{9}([_A-Za-z0-9-]{0,91})$\/.test(ep))bad(F(p+&quot;_endpoint&quot;),&quot;Enter the electronic invoicing address registered in the French directory (starting with the 9-digit SIREN).&quot;);});\nqa(&quot;[data-r]&quot;,form).forEach(function(e){if(!String(e.value).trim())bad(e,&quot;This field is required.&quot;)});\nif(val(&quot;type&quot;)===&quot;381&quot;&amp;&amp;!val(&quot;preceding&quot;))bad(F(&quot;preceding&quot;),&quot;Enter the invoice this credit note corrects.&quot;);\nif(val(&quot;type&quot;)===&quot;381&quot;&amp;&amp;!val(&quot;precedingDate&quot;))bad(F(&quot;precedingDate&quot;),&quot;Enter the original invoice date.&quot;);\nif(val(&quot;s_siren&quot;)&amp;&amp;!sirenOk(val(&quot;s_siren&quot;)))bad(F(&quot;s_siren&quot;),&quot;Enter a valid 9-digit SIREN.&quot;);\nif(val(&quot;s_vat&quot;)&amp;&amp;!vatOk(val(&quot;s_vat&quot;)))bad(F(&quot;s_vat&quot;),&quot;Enter the VAT number with its country code, e.g. FR12345678901.&quot;);\nif(val(&quot;b_country&quot;)===&quot;FR&quot;&amp;&amp;!val(&quot;b_siren&quot;))bad(F(&quot;b_siren&quot;),&quot;SIREN is required for buyers in France.&quot;);\nelse if(val(&quot;b_siren&quot;)&amp;&amp;!sirenOk(val(&quot;b_siren&quot;)))bad(F(&quot;b_siren&quot;),&quot;Enter a valid 9-digit SIREN.&quot;);\nif(val(&quot;b_vat&quot;)&amp;&amp;!vatOk(val(&quot;b_vat&quot;)))bad(F(&quot;b_vat&quot;),&quot;Enter the VAT number with its country code.&quot;);\nif(val(&quot;d_on&quot;))[&quot;d_street&quot;,&quot;d_post&quot;,&quot;d_city&quot;].forEach(function(n){if(!val(n))bad(F(n),&quot;This field is required.&quot;)});\nt.lines.forEach(function(l,i){var p=&quot;Line &quot;+(i+1)+&quot;: &quot;;\nif(!l.desc)bad(l.g(&quot;desc&quot;),p+&quot;enter a description.&quot;);\nif(!(l.qty&gt;0))bad(l.g(&quot;qty&quot;),p+&quot;quantity must be greater than 0.&quot;);\nif(l.g(&quot;price&quot;).value===&quot;&quot;)bad(l.g(&quot;price&quot;),p+&quot;enter a unit price.&quot;);\nif(l.cat===&quot;S&quot;&amp;&amp;!(l.rate&gt;0))bad(l.g(&quot;rate&quot;),p+&quot;standard rate needs a VAT % above 0.&quot;);\n});\nvar needEx=t.breakdown.some(function(x){return [&quot;E&quot;,&quot;AE&quot;,&quot;K&quot;,&quot;G&quot;].indexOf(x.cat)&gt;=0});\nif(needEx&amp;&amp;!val(&quot;exReason&quot;))bad(F(&quot;exReason&quot;),&quot;Enter the legal reason for the VAT exemption.&quot;);\nif(t.breakdown.some(function(x){return [&quot;AE&quot;,&quot;K&quot;].indexOf(x.cat)&gt;=0})&amp;&amp;!val(&quot;b_vat&quot;))bad(F(&quot;b_vat&quot;),&quot;Reverse charge and intra-EU supplies need the buyer VAT number.&quot;);\nif(t.breakdown.some(function(x){return x.cat===&quot;K&quot;})&amp;&amp;!val(&quot;deliveryDate&quot;))bad(F(&quot;deliveryDate&quot;),&quot;Intra-EU supplies need the delivery date.&quot;);\nif([&quot;30&quot;,&quot;58&quot;].indexOf(val(&quot;p_means&quot;))&gt;=0&amp;&amp;!val(&quot;iban&quot;))bad(F(&quot;iban&quot;),&quot;Enter the IBAN for bank transfer payments.&quot;);\nelse if(val(&quot;iban&quot;)&amp;&amp;!validIBAN(val(&quot;iban&quot;)))bad(F(&quot;iban&quot;),&quot;Enter a valid IBAN, including the country code and check digits.&quot;);\nif(t.grand&gt;0&amp;&amp;!val(&quot;dueDate&quot;)&amp;&amp;!val(&quot;terms&quot;))bad(F(&quot;terms&quot;),&quot;Enter a due date or payment terms.&quot;);\nif(val(&quot;dueDate&quot;)&amp;&amp;val(&quot;issueDate&quot;)&amp;&amp;val(&quot;dueDate&quot;)&lt;val(&quot;issueDate&quot;))bad(F(&quot;dueDate&quot;),&quot;The due date cannot be before the invoice date.&quot;);\nvar es=v(&quot;es&quot;);\nif(errs.length){es.innerHTML=&quot;&lt;strong&gt;Fix &quot;+errs.length+&quot; item&quot;+(errs.length&gt;1?&quot;s&quot;:&quot;&quot;)+&quot; before creating the Factur-X:&lt;\/strong&gt;&lt;ul&gt;&quot;+errs.map(function(x,i){return &#039;&lt;li&gt;&lt;a href=&quot;#&quot; data-i=&quot;&#039;+i+&#039;&quot;&gt;&#039;+x.m+&quot;&lt;\/a&gt;&lt;\/li&gt;&quot;}).join(&quot;&quot;)+&quot;&lt;\/ul&gt;&quot;;es.hidden=false;es.onclick=function(e){var a=e.target.closest(&quot;a[data-i]&quot;);if(a){e.preventDefault();errs[+a.getAttribute(&quot;data-i&quot;)].el.focus()}};es.focus()}\nelse{es.hidden=true;es.innerHTML=&quot;&quot;}\nreturn errs.length===0;\n}\nfunction x(s){return String(s).replace(\/&amp;\/g,&quot;&amp;amp;&quot;).replace(\/&lt;\/g,&quot;&amp;lt;&quot;).replace(\/&gt;\/g,&quot;&amp;gt;&quot;).replace(\/&quot;\/g,&quot;&amp;quot;&quot;)}\nfunction d8(s){return s.replace(\/-\/g,&quot;&quot;)}\nfunction clean(s){return s.replace(\/[\\s.-]\/g,&quot;&quot;).toUpperCase()}\nfunction addr(p,c,s){return &quot;&lt;ram:PostalTradeAddress&gt;&lt;ram:PostcodeCode&gt;&quot;+x(p)+&quot;&lt;\/ram:PostcodeCode&gt;&lt;ram:LineOne&gt;&quot;+x(s)+&quot;&lt;\/ram:LineOne&gt;&lt;ram:CityName&gt;&quot;+x(c)+&quot;&lt;\/ram:CityName&gt;&lt;ram:CountryID&gt;&quot;+x(c2(arguments[3]))+&quot;&lt;\/ram:CountryID&gt;&lt;\/ram:PostalTradeAddress&gt;&quot;}\nfunction c2(s){return s}\nfunction party(pfx){var o=&quot;&lt;ram:Name&gt;&quot;+x(val(pfx+&quot;_name&quot;))+&quot;&lt;\/ram:Name&gt;&quot;;\nif(val(pfx+&quot;_siren&quot;))o+=&#039;&lt;ram:SpecifiedLegalOrganization&gt;&lt;ram:ID schemeID=&quot;0002&quot;&gt;&#039;+x(val(pfx+&quot;_siren&quot;).replace(\/\\s\/g,&quot;&quot;))+&quot;&lt;\/ram:ID&gt;&lt;\/ram:SpecifiedLegalOrganization&gt;&quot;;\no+=addr(val(pfx+&quot;_post&quot;),val(pfx+&quot;_city&quot;),val(pfx+&quot;_street&quot;),val(pfx+&quot;_country&quot;));\nif(val(pfx+&quot;_endpoint&quot;))o+=&#039;&lt;ram:URIUniversalCommunication&gt;&lt;ram:URIID schemeID=&quot;&#039;+x(val(pfx+&quot;_scheme&quot;))+&#039;&quot;&gt;&#039;+x(val(pfx+&quot;_endpoint&quot;))+&quot;&lt;\/ram:URIID&gt;&lt;\/ram:URIUniversalCommunication&gt;&quot;;\nif(val(pfx+&quot;_vat&quot;))o+=&#039;&lt;ram:SpecifiedTaxRegistration&gt;&lt;ram:ID schemeID=&quot;VA&quot;&gt;&#039;+x(clean(val(pfx+&quot;_vat&quot;)))+&quot;&lt;\/ram:ID&gt;&lt;\/ram:SpecifiedTaxRegistration&gt;&quot;;\nreturn o}\nfunction buildXML(t){\nvar cur=x(val(&quot;currency&quot;)),A=function(n){return fmt(n)};\nvar o=&#039;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\\n&lt;rsm:CrossIndustryInvoice xmlns:rsm=&quot;urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100&quot; xmlns:qdt=&quot;urn:un:unece:uncefact:data:standard:QualifiedDataType:100&quot; xmlns:ram=&quot;urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100&quot; xmlns:udt=&quot;urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100&quot;&gt;&#039;;\no+=&quot;&lt;rsm:ExchangedDocumentContext&gt;&lt;ram:GuidelineSpecifiedDocumentContextParameter&gt;&lt;ram:ID&gt;urn:cen.eu:en16931:2017&lt;\/ram:ID&gt;&lt;\/ram:GuidelineSpecifiedDocumentContextParameter&gt;&lt;\/rsm:ExchangedDocumentContext&gt;&quot;;\no+=&quot;&lt;rsm:ExchangedDocument&gt;&lt;ram:ID&gt;&quot;+x(val(&quot;number&quot;))+&quot;&lt;\/ram:ID&gt;&lt;ram:TypeCode&gt;&quot;+x(val(&quot;type&quot;))+&#039;&lt;\/ram:TypeCode&gt;&lt;ram:IssueDateTime&gt;&lt;udt:DateTimeString format=&quot;102&quot;&gt;&#039;+d8(val(&quot;issueDate&quot;))+&quot;&lt;\/udt:DateTimeString&gt;&lt;\/ram:IssueDateTime&gt;&quot;;\no+=&quot;&lt;ram:IncludedNote&gt;&lt;ram:Content&gt;Operation type: &quot;+x(val(&quot;opType&quot;))+&quot;&lt;\/ram:Content&gt;&lt;\/ram:IncludedNote&gt;&quot;;\nif(val(&quot;vatDebits&quot;))o+=&quot;&lt;ram:IncludedNote&gt;&lt;ram:Content&gt;Option pour le paiement de la TVA d&#039;apr\\u00e8s les d\\u00e9bits&lt;\/ram:Content&gt;&lt;\/ram:IncludedNote&gt;&quot;;\n[[&quot;fr_recovery&quot;,&quot;PMT&quot;],[&quot;fr_late&quot;,&quot;PMD&quot;],[&quot;fr_discount&quot;,&quot;AAB&quot;]].forEach(function(n){if(val(n[0]))o+=&quot;&lt;ram:IncludedNote&gt;&lt;ram:Content&gt;&quot;+x(val(n[0]))+&quot;&lt;\/ram:Content&gt;&lt;ram:SubjectCode&gt;&quot;+n[1]+&quot;&lt;\/ram:SubjectCode&gt;&lt;\/ram:IncludedNote&gt;&quot;;});\no+=&quot;&lt;\/rsm:ExchangedDocument&gt;&lt;rsm:SupplyChainTradeTransaction&gt;&quot;;\nt.lines.forEach(function(l,i){\no+=&quot;&lt;ram:IncludedSupplyChainTradeLineItem&gt;&lt;ram:AssociatedDocumentLineDocument&gt;&lt;ram:LineID&gt;&quot;+(i+1)+&quot;&lt;\/ram:LineID&gt;&lt;\/ram:AssociatedDocumentLineDocument&gt;&quot;;\no+=&quot;&lt;ram:SpecifiedTradeProduct&gt;&lt;ram:Name&gt;&quot;+x(l.desc)+&quot;&lt;\/ram:Name&gt;&lt;\/ram:SpecifiedTradeProduct&gt;&quot;;\no+=&quot;&lt;ram:SpecifiedLineTradeAgreement&gt;&lt;ram:NetPriceProductTradePrice&gt;&lt;ram:ChargeAmount&gt;&quot;+l.price+&quot;&lt;\/ram:ChargeAmount&gt;&lt;\/ram:NetPriceProductTradePrice&gt;&lt;\/ram:SpecifiedLineTradeAgreement&gt;&quot;;\no+=&#039;&lt;ram:SpecifiedLineTradeDelivery&gt;&lt;ram:BilledQuantity unitCode=&quot;&#039;+l.unit+&#039;&quot;&gt;&#039;+l.qty+&quot;&lt;\/ram:BilledQuantity&gt;&lt;\/ram:SpecifiedLineTradeDelivery&gt;&quot;;\no+=&quot;&lt;ram:SpecifiedLineTradeSettlement&gt;&lt;ram:ApplicableTradeTax&gt;&lt;ram:TypeCode&gt;VAT&lt;\/ram:TypeCode&gt;&lt;ram:CategoryCode&gt;&quot;+l.cat+&quot;&lt;\/ram:CategoryCode&gt;&lt;ram:RateApplicablePercent&gt;&quot;+l.rate+&quot;&lt;\/ram:RateApplicablePercent&gt;&lt;\/ram:ApplicableTradeTax&gt;&quot;;\no+=&quot;&lt;ram:SpecifiedTradeSettlementLineMonetarySummation&gt;&lt;ram:LineTotalAmount&gt;&quot;+A(l.net)+&quot;&lt;\/ram:LineTotalAmount&gt;&lt;\/ram:SpecifiedTradeSettlementLineMonetarySummation&gt;&lt;\/ram:SpecifiedLineTradeSettlement&gt;&lt;\/ram:IncludedSupplyChainTradeLineItem&gt;&quot;;\n});\no+=&quot;&lt;ram:ApplicableHeaderTradeAgreement&gt;&quot;;\nif(val(&quot;buyerRef&quot;))o+=&quot;&lt;ram:BuyerReference&gt;&quot;+x(val(&quot;buyerRef&quot;))+&quot;&lt;\/ram:BuyerReference&gt;&quot;;\no+=&quot;&lt;ram:SellerTradeParty&gt;&quot;+party(&quot;s&quot;)+&quot;&lt;\/ram:SellerTradeParty&gt;&lt;ram:BuyerTradeParty&gt;&quot;+party(&quot;b&quot;)+&quot;&lt;\/ram:BuyerTradeParty&gt;&lt;\/ram:ApplicableHeaderTradeAgreement&gt;&quot;;\no+=&quot;&lt;ram:ApplicableHeaderTradeDelivery&gt;&quot;;\nif(!val(&quot;d_on&quot;))o+=&quot;&lt;ram:ShipToTradeParty&gt;&quot;+addr(val(&quot;b_post&quot;),val(&quot;b_city&quot;),val(&quot;b_street&quot;),val(&quot;b_country&quot;))+&quot;&lt;\/ram:ShipToTradeParty&gt;&quot;;\nif(val(&quot;d_on&quot;))o+=&quot;&lt;ram:ShipToTradeParty&gt;&quot;+addr(val(&quot;d_post&quot;),val(&quot;d_city&quot;),val(&quot;d_street&quot;),val(&quot;d_country&quot;))+&quot;&lt;\/ram:ShipToTradeParty&gt;&quot;;\nif(val(&quot;deliveryDate&quot;))o+=&#039;&lt;ram:ActualDeliverySupplyChainEvent&gt;&lt;ram:OccurrenceDateTime&gt;&lt;udt:DateTimeString format=&quot;102&quot;&gt;&#039;+d8(val(&quot;deliveryDate&quot;))+&quot;&lt;\/udt:DateTimeString&gt;&lt;\/ram:OccurrenceDateTime&gt;&lt;\/ram:ActualDeliverySupplyChainEvent&gt;&quot;;\no+=&quot;&lt;\/ram:ApplicableHeaderTradeDelivery&gt;&quot;;\no+=&quot;&lt;ram:ApplicableHeaderTradeSettlement&gt;&lt;ram:InvoiceCurrencyCode&gt;&quot;+cur+&quot;&lt;\/ram:InvoiceCurrencyCode&gt;&quot;;\no+=&quot;&lt;ram:SpecifiedTradeSettlementPaymentMeans&gt;&lt;ram:TypeCode&gt;&quot;+val(&quot;p_means&quot;)+&quot;&lt;\/ram:TypeCode&gt;&quot;;\nif(val(&quot;iban&quot;))o+=&quot;&lt;ram:PayeePartyCreditorFinancialAccount&gt;&lt;ram:IBANID&gt;&quot;+x(clean(val(&quot;iban&quot;)))+&quot;&lt;\/ram:IBANID&gt;&lt;\/ram:PayeePartyCreditorFinancialAccount&gt;&quot;;\nif(val(&quot;bic&quot;))o+=&quot;&lt;ram:PayeeSpecifiedCreditorFinancialInstitution&gt;&lt;ram:BICID&gt;&quot;+x(clean(val(&quot;bic&quot;)))+&quot;&lt;\/ram:BICID&gt;&lt;\/ram:PayeeSpecifiedCreditorFinancialInstitution&gt;&quot;;\no+=&quot;&lt;\/ram:SpecifiedTradeSettlementPaymentMeans&gt;&quot;;\nt.breakdown.forEach(function(b){\no+=&quot;&lt;ram:ApplicableTradeTax&gt;&lt;ram:CalculatedAmount&gt;&quot;+A(b.tax)+&quot;&lt;\/ram:CalculatedAmount&gt;&lt;ram:TypeCode&gt;VAT&lt;\/ram:TypeCode&gt;&quot;;\nif([&quot;E&quot;,&quot;AE&quot;,&quot;K&quot;,&quot;G&quot;].indexOf(b.cat)&gt;=0)o+=&quot;&lt;ram:ExemptionReason&gt;&quot;+x(val(&quot;exReason&quot;))+&quot;&lt;\/ram:ExemptionReason&gt;&quot;;\no+=&quot;&lt;ram:BasisAmount&gt;&quot;+A(b.basis)+&quot;&lt;\/ram:BasisAmount&gt;&lt;ram:CategoryCode&gt;&quot;+b.cat+&quot;&lt;\/ram:CategoryCode&gt;&quot;;\nif(val(&quot;vatDebits&quot;))o+=&quot;&lt;ram:DueDateTypeCode&gt;5&lt;\/ram:DueDateTypeCode&gt;&quot;;\no+=&quot;&lt;ram:RateApplicablePercent&gt;&quot;+b.rate+&quot;&lt;\/ram:RateApplicablePercent&gt;&quot;;\no+=&quot;&lt;\/ram:ApplicableTradeTax&gt;&quot;;\n});\nif(val(&quot;terms&quot;)||val(&quot;dueDate&quot;)){o+=&quot;&lt;ram:SpecifiedTradePaymentTerms&gt;&quot;;if(val(&quot;terms&quot;))o+=&quot;&lt;ram:Description&gt;&quot;+x(val(&quot;terms&quot;))+&quot;&lt;\/ram:Description&gt;&quot;;if(val(&quot;dueDate&quot;))o+=&#039;&lt;ram:DueDateDateTime&gt;&lt;udt:DateTimeString format=&quot;102&quot;&gt;&#039;+d8(val(&quot;dueDate&quot;))+&quot;&lt;\/udt:DateTimeString&gt;&lt;\/ram:DueDateDateTime&gt;&quot;;o+=&quot;&lt;\/ram:SpecifiedTradePaymentTerms&gt;&quot;}\no+=&quot;&lt;ram:SpecifiedTradeSettlementHeaderMonetarySummation&gt;&lt;ram:LineTotalAmount&gt;&quot;+A(t.net)+&quot;&lt;\/ram:LineTotalAmount&gt;&lt;ram:TaxBasisTotalAmount&gt;&quot;+A(t.net)+&#039;&lt;\/ram:TaxBasisTotalAmount&gt;&lt;ram:TaxTotalAmount currencyID=&quot;&#039;+cur+&#039;&quot;&gt;&#039;+A(t.tax)+&quot;&lt;\/ram:TaxTotalAmount&gt;&lt;ram:GrandTotalAmount&gt;&quot;+A(t.grand)+&quot;&lt;\/ram:GrandTotalAmount&gt;&lt;ram:DuePayableAmount&gt;&quot;+A(t.grand)+&quot;&lt;\/ram:DuePayableAmount&gt;&lt;\/ram:SpecifiedTradeSettlementHeaderMonetarySummation&gt;&quot;;\nif(val(&quot;type&quot;)===&quot;381&quot;)o+=&#039;&lt;ram:InvoiceReferencedDocument&gt;&lt;ram:IssuerAssignedID&gt;&#039;+x(val(&quot;preceding&quot;))+&#039;&lt;\/ram:IssuerAssignedID&gt;&lt;ram:FormattedIssueDateTime&gt;&lt;qdt:DateTimeString format=&quot;102&quot;&gt;&#039;+d8(val(&quot;precedingDate&quot;))+&#039;&lt;\/qdt:DateTimeString&gt;&lt;\/ram:FormattedIssueDateTime&gt;&lt;\/ram:InvoiceReferencedDocument&gt;&#039;;\no+=&quot;&lt;\/ram:ApplicableHeaderTradeSettlement&gt;&lt;\/rsm:SupplyChainTradeTransaction&gt;&lt;\/rsm:CrossIndustryInvoice&gt;&quot;;\nreturn o;\n}\nfunction xmp(title){var now=new Date().toISOString().replace(\/\\.\\d+Z$\/,&quot;Z&quot;);\nfunction prop(n,d){return &#039;&lt;rdf:li rdf:parseType=&quot;Resource&quot;&gt;&lt;pdfaProperty:name&gt;&#039;+n+&quot;&lt;\/pdfaProperty:name&gt;&lt;pdfaProperty:valueType&gt;Text&lt;\/pdfaProperty:valueType&gt;&lt;pdfaProperty:category&gt;external&lt;\/pdfaProperty:category&gt;&lt;pdfaProperty:description&gt;&quot;+d+&quot;&lt;\/pdfaProperty:description&gt;&lt;\/rdf:li&gt;&quot;}\nreturn &#039;&lt;?xpacket begin=&quot;\\uFEFF&quot; id=&quot;W5M0MpCehiHzreSzNTczkc9d&quot;?&gt;&lt;x:xmpmeta xmlns:x=&quot;adobe:ns:meta\/&quot;&gt;&lt;rdf:RDF xmlns:rdf=&quot;http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#&quot;&gt;&#039;+\n&#039;&lt;rdf:Description rdf:about=&quot;&quot; xmlns:pdfaid=&quot;http:\/\/www.aiim.org\/pdfa\/ns\/id\/&quot;&gt;&lt;pdfaid:part&gt;3&lt;\/pdfaid:part&gt;&lt;pdfaid:conformance&gt;B&lt;\/pdfaid:conformance&gt;&lt;\/rdf:Description&gt;&#039;+\n&#039;&lt;rdf:Description rdf:about=&quot;&quot; xmlns:dc=&quot;http:\/\/purl.org\/dc\/elements\/1.1\/&quot;&gt;&lt;dc:title&gt;&lt;rdf:Alt&gt;&lt;rdf:li xml:lang=&quot;x-default&quot;&gt;&#039;+x(title)+&quot;&lt;\/rdf:li&gt;&lt;\/rdf:Alt&gt;&lt;\/dc:title&gt;&lt;\/rdf:Description&gt;&quot;+\n&#039;&lt;rdf:Description rdf:about=&quot;&quot; xmlns:pdf=&quot;http:\/\/ns.adobe.com\/pdf\/1.3\/&quot;&gt;&lt;pdf:Producer&gt;Docnova Factur-X Converter&lt;\/pdf:Producer&gt;&lt;\/rdf:Description&gt;&#039;+\n&#039;&lt;rdf:Description rdf:about=&quot;&quot; xmlns:xmp=&quot;http:\/\/ns.adobe.com\/xap\/1.0\/&quot;&gt;&lt;xmp:CreatorTool&gt;Docnova Factur-X Converter&lt;\/xmp:CreatorTool&gt;&lt;xmp:CreateDate&gt;&#039;+now+&quot;&lt;\/xmp:CreateDate&gt;&lt;xmp:ModifyDate&gt;&quot;+now+&quot;&lt;\/xmp:ModifyDate&gt;&lt;\/rdf:Description&gt;&quot;+\n&#039;&lt;rdf:Description rdf:about=&quot;&quot; xmlns:pdfaExtension=&quot;http:\/\/www.aiim.org\/pdfa\/ns\/extension\/&quot; xmlns:pdfaSchema=&quot;http:\/\/www.aiim.org\/pdfa\/ns\/schema#&quot; xmlns:pdfaProperty=&quot;http:\/\/www.aiim.org\/pdfa\/ns\/property#&quot;&gt;&lt;pdfaExtension:schemas&gt;&lt;rdf:Bag&gt;&lt;rdf:li rdf:parseType=&quot;Resource&quot;&gt;&lt;pdfaSchema:schema&gt;Factur-X PDFA Extension Schema&lt;\/pdfaSchema:schema&gt;&lt;pdfaSchema:namespaceURI&gt;urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#&lt;\/pdfaSchema:namespaceURI&gt;&lt;pdfaSchema:prefix&gt;fx&lt;\/pdfaSchema:prefix&gt;&lt;pdfaSchema:property&gt;&lt;rdf:Seq&gt;&#039;+\nprop(&quot;DocumentFileName&quot;,&quot;name of the embedded XML invoice file&quot;)+prop(&quot;DocumentType&quot;,&quot;INVOICE&quot;)+prop(&quot;Version&quot;,&quot;The actual version of the Factur-X XML schema&quot;)+prop(&quot;ConformanceLevel&quot;,&quot;The conformance level of the embedded Factur-X data&quot;)+\n&quot;&lt;\/rdf:Seq&gt;&lt;\/pdfaSchema:property&gt;&lt;\/rdf:li&gt;&lt;\/rdf:Bag&gt;&lt;\/pdfaExtension:schemas&gt;&lt;\/rdf:Description&gt;&quot;+\n&#039;&lt;rdf:Description rdf:about=&quot;&quot; xmlns:fx=&quot;urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#&quot;&gt;&lt;fx:DocumentType&gt;INVOICE&lt;\/fx:DocumentType&gt;&lt;fx:DocumentFileName&gt;factur-x.xml&lt;\/fx:DocumentFileName&gt;&lt;fx:Version&gt;1.0&lt;\/fx:Version&gt;&lt;fx:ConformanceLevel&gt;EN 16931&lt;\/fx:ConformanceLevel&gt;&lt;\/rdf:Description&gt;&#039;+\n&#039;&lt;\/rdf:RDF&gt;&lt;\/x:xmpmeta&gt;&lt;?xpacket end=&quot;w&quot;?&gt;&#039;}\nfunction embed(pdfBytes,xmlStr,title){\nvar P=window.PDFLib;if(!P)return Promise.reject(new Error(&quot;lib&quot;));\nreturn P.PDFDocument.load(pdfBytes,{updateMetadata:false}).then(function(doc){\nvar ctx=doc.context,N=P.PDFName,S=P.PDFString,enc=new TextEncoder(),xb=enc.encode(xmlStr),now=new Date();\nctx.enumerateIndirectObjects().forEach(function(entry){var obj=entry[1],dict=obj instanceof P.PDFRawStream?obj.dict:obj instanceof P.PDFDict?obj:null;if(dict&amp;&amp;dict.get(N.of(&quot;Subtype&quot;))===N.of(&quot;Image&quot;)&amp;&amp;dict.has(N.of(&quot;Interpolate&quot;)))dict.set(N.of(&quot;Interpolate&quot;),P.PDFBool.False);});\nctx.enumerateIndirectObjects().forEach(function(entry){var obj=entry[1];if(!(obj instanceof P.PDFDict)||obj.get(N.of(&quot;Type&quot;))!==N.of(&quot;Filespec&quot;))return;var f=obj.get(N.of(&quot;UF&quot;))||obj.get(N.of(&quot;F&quot;)),filename=f&amp;&amp;typeof f.decodeText===&quot;function&quot;?f.decodeText():&quot;&quot;;if(filename.toLowerCase()===&quot;factur-x.xml&quot;)ctx.delete(entry[0]);});\nctx.enumerateIndirectObjects().forEach(function(entry){var obj=entry[1];if(obj instanceof P.PDFDict&amp;&amp;obj.get(N.of(&quot;Subtype&quot;))===N.of(&quot;CIDFontType2&quot;)&amp;&amp;!obj.has(N.of(&quot;CIDToGIDMap&quot;)))obj.set(N.of(&quot;CIDToGIDMap&quot;),N.of(&quot;Identity&quot;));});\nvar ef=ctx.flateStream(xb,{Type:&quot;EmbeddedFile&quot;,Subtype:&quot;text\/xml&quot;,Params:{Size:xb.length,ModDate:S.fromDate(now)}});\nvar efRef=ctx.register(ef);\nvar fs=ctx.obj({Type:&quot;Filespec&quot;,F:S.of(&quot;factur-x.xml&quot;),UF:P.PDFHexString.fromText(&quot;factur-x.xml&quot;),AFRelationship:&quot;Alternative&quot;,Desc:S.of(&quot;Factur-X invoice data&quot;),EF:{F:efRef,UF:efRef}});\nvar fsRef=ctx.register(fs),cat=doc.catalog;\nvar intents=cat.lookupMaybe(N.of(&quot;OutputIntents&quot;),P.PDFArray),hasIntent=false;\nif(intents){for(var oi=0;oi&lt;intents.size();oi++){var existing=intents.lookup(oi,P.PDFDict);if(existing.get(N.of(&quot;S&quot;))===N.of(&quot;GTS_PDFA1&quot;)&amp;&amp;existing.has(N.of(&quot;DestOutputProfile&quot;)))hasIntent=true;}}\nif(!hasIntent){\nvar raw=atob(&quot;AAAKEAAAAAACEAAAbW50clJHQiBYWVogAAAAAAAAAAAAAAAAYWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPbWAAEAAAAA0y0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKZGVzYwAAAPwAAAB8Y3BydAAAAXgAAAAod3RwdAAAAaAAAAAUYmtwdAAAAbQAAAAUclhZWgAAAcgAAAAUZ1hZWgAAAdwAAAAUYlhZWgAAAfAAAAAUclRSQwAAAgQAAAgMZ1RSQwAAAgQAAAgMYlRSQwAAAgQAAAgMZGVzYwAAAAAAAAAiQXJ0aWZleCBTb2Z0d2FyZSBzUkdCIElDQyBQcm9maWxlAAAAAAAAAAAAAAAiQXJ0aWZleCBTb2Z0d2FyZSBzUkdCIElDQyBQcm9maWxlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFydGlmZXggU29mdHdhcmUgMjAxMQBYWVogAAAAAAAA81EAAQAAAAEWzFhZWiAAAAAAAAAAAAAAAAAAAAAAWFlaIAAAAAAAAG+iAAA49QAAA5BYWVogAAAAAAAAYpkAALeFAAAY2lhZWiAAAAAAAAAkoAAAD4QAALbPY3VydgAAAAAAAAQAAAAABQAKAA8AFAAZAB4AIwAoAC0AMgA3ADsAQABFAEoATwBUAFkAXgBjAGgAbQByAHcAfACBAIYAiwCQAJUAmgCfAKQAqQCuALIAtwC8AMEAxgDLANAA1QDbAOAA5QDrAPAA9gD7AQEBBwENARMBGQEfASUBKwEyATgBPgFFAUwBUgFZAWABZwFuAXUBfAGDAYsBkgGaAaEBqQGxAbkBwQHJAdEB2QHhAekB8gH6AgMCDAIUAh0CJgIvAjgCQQJLAlQCXQJnAnECegKEAo4CmAKiAqwCtgLBAssC1QLgAusC9QMAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+AD7AP5BAYEEwQgBC0EOwRIBFUEYwRxBH4EjASaBKgEtgTEBNME4QTwBP4FDQUcBSsFOgVJBVgFZwV3BYYFlgWmBbUFxQXVBeUF9gYGBhYGJwY3BkgGWQZqBnsGjAadBq8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB\/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+woRCicKPQpUCmoKgQqYCq4KxQrcCvMLCwsiCzkLUQtpC4ALmAuwC8gL4Qv5DBIMKgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+zD88P7BAJECYQQxBhEH4QmxC5ENcQ9RETETERTxFtEYwRqhHJEegSBxImEkUSZBKEEqMSwxLjEwMTIxNDE2MTgxOkE8UT5RQGFCcUSRRqFIsUrRTOFPAVEhU0FVYVeBWbFb0V4BYDFiYWSRZsFo8WshbWFvoXHRdBF2UXiReuF9IX9xgbGEAYZRiKGK8Y1Rj6GSAZRRlrGZEZtxndGgQaKhpRGncanhrFGuwbFBs7G2MbihuyG9ocAhwqHFIcexyjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI\/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg\/KHEooijUKQYpOClrKZ0p0CoCKjUqaCqbKs8rAis2K2krnSvRLAUsOSxuLKIs1y0MLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv\/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN\/M7gz8TQrNGU0njTYNRM1TTWHNcI1\/TY3NnI2rjbpNyQ3YDecN9c4FDhQOIw4yDkFOUI5fzm8Ofk6Njp0OrI67zstO2s7qjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE\/YT+iP+JAI0BkQKZA50EpQWpBrEHuQjBCckK1QvdDOkN9Q8BEA0RHRIpEzkUSRVVFmkXeRiJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0\/dUCdQcVC7UQZRUFGbUeZSMVJ8UsdTE1NfU6pT9lRCVI9U21UoVXVVwlYPVlxWqVb3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg\/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg\/aJZo7GlDaZpp8WpIap9q92tPa6dr\/2xXbK9tCG1gbbluEm5rbsRvHm94b9FwK3CGcOBxOnGVcfByS3KmcwFzXXO4dBR0cHTMdSh1hXXhdj52m3b4d1Z3s3gReG54zHkqeYl553pGeqV7BHtje8J8IXyBfOF9QX2hfgF+Yn7CfyN\/hH\/lgEeAqIEKgWuBzYIwgpKC9INXg7qEHYSAhOOFR4Wrhg6GcobXhzuHn4gEiGmIzokziZmJ\/opkisqLMIuWi\/yMY4zKjTGNmI3\/jmaOzo82j56QBpBukNaRP5GokhGSepLjk02TtpQglIqU9JVflcmWNJaflwqXdZfgmEyYuJkkmZCZ\/JpomtWbQpuvnByciZz3nWSd0p5Anq6fHZ+Ln\/qgaaDYoUehtqImopajBqN2o+akVqTHpTilqaYapoum\/adup+CoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFq+LsACwdbDqsWCx1rJLssKzOLOutCW0nLUTtYq2AbZ5tvC3aLfguFm40blKucK6O7q1uy67p7whvJu9Fb2Pvgq+hL7\/v3q\/9cBwwOzBZ8Hjwl\/C28NYw9TEUcTOxUvFyMZGxsPHQce\/yD3IvMk6ybnKOMq3yzbLtsw1zLXNNc21zjbOts83z7jQOdC60TzRvtI\/0sHTRNPG1EnUy9VO1dHWVdbY11zX4Nhk2OjZbNnx2nba+9uA3AXcit0Q3ZbeHN6i3ynfr+A24L3hROHM4lPi2+Nj4+vkc+T85YTmDeaW5x\/nqegy6LzpRunQ6lvq5etw6\/vshu0R7ZzuKO6070DvzPBY8OXxcvH\/8ozzGfOn9DT0wvVQ9d72bfb794r4Gfio+Tj5x\/pX+uf7d\/wH\/Jj9Kf26\/kv+3P9t\/\/8=&quot;),icc=new Uint8Array(raw.length);\nfor(var ci=0;ci&lt;raw.length;ci++)icc[ci]=raw.charCodeAt(ci);\nvar profile=ctx.register(ctx.flateStream(icc,{N:3,Alternate:&quot;DeviceRGB&quot;}));\nvar intent=ctx.register(ctx.obj({Type:&quot;OutputIntent&quot;,S:&quot;GTS_PDFA1&quot;,OutputConditionIdentifier:S.of(&quot;sRGB IEC61966-2.1&quot;),Info:S.of(&quot;sRGB IEC61966-2.1&quot;),RegistryName:S.of(&quot;http:\/\/www.color.org&quot;),DestOutputProfile:profile}));\nif(!intents){intents=ctx.obj([]);cat.set(N.of(&quot;OutputIntents&quot;),intents);}intents.push(intent);\n}\n\ncat.set(N.of(&quot;AF&quot;),ctx.obj([fsRef]));\nvar names=cat.lookupMaybe(N.of(&quot;Names&quot;),P.PDFDict);if(!names){names=ctx.obj({});cat.set(N.of(&quot;Names&quot;),names)}\nnames.set(N.of(&quot;EmbeddedFiles&quot;),ctx.obj({Names:[S.of(&quot;factur-x.xml&quot;),fsRef]}));\nvar mb=enc.encode(xmp(title)),ms=ctx.stream(mb,{Type:&quot;Metadata&quot;,Subtype:&quot;XML&quot;,Length:mb.length});\ncat.set(N.of(&quot;Metadata&quot;),ctx.register(ms));\ndoc.setTitle(title);doc.setProducer(&quot;Docnova Factur-X Converter&quot;);doc.setCreator(&quot;Docnova Factur-X Converter&quot;);\nreturn doc.save();\n})}\nfunction viaService(xmlStr){\nvar fd=new FormData();fd.append(&quot;pdf&quot;,st.file,st.file.name);fd.append(&quot;xml&quot;,new Blob([xmlStr],{type:&quot;text\/xml&quot;}),&quot;factur-x.xml&quot;);fd.append(&quot;profile&quot;,&quot;EN16931&quot;);\nreturn fetch(CONFIG.generateEndpoint,{method:&quot;POST&quot;,body:fd}).then(function(r){if(!r.ok)throw new Error(&quot;svc &quot;+r.status);return r.arrayBuffer()}).then(function(b){return new Uint8Array(b)})}\nform.addEventListener(&quot;submit&quot;,function(e){\ne.preventDefault();var t=calc();if(!validate(t))return;\nvar go=v(&quot;go&quot;),lbl=go.textContent;go.disabled=true;go.textContent=&quot;Creating Factur-X\\u2026&quot;;\nvar xmlStr=buildXML(t),title=(val(&quot;type&quot;)===&quot;381&quot;?&quot;Credit note &quot;:&quot;Invoice &quot;)+val(&quot;number&quot;);\nvar p=CONFIG.generateEndpoint?viaService(xmlStr):embed(st.bytes,xmlStr,title);\np.then(function(out){\nif(st.out)URL.revokeObjectURL(st.out);if(st.xurl)URL.revokeObjectURL(st.xurl);\nst.out=URL.createObjectURL(new Blob([out],{type:&quot;application\/pdf&quot;}));st.xurl=URL.createObjectURL(new Blob([xmlStr],{type:&quot;text\/xml&quot;}));\nvar base=val(&quot;number&quot;).replace(\/[^\\w.-]+\/g,&quot;_&quot;)||&quot;invoice&quot;;\nv(&quot;dl&quot;).href=st.out;v(&quot;dl&quot;).setAttribute(&quot;download&quot;,base+&quot;-factur-x.pdf&quot;);v(&quot;dlx&quot;).href=st.xurl;v(&quot;dlx&quot;).setAttribute(&quot;download&quot;,base+&quot;-factur-x.xml&quot;);\nv(&quot;test&quot;).hidden=!!CONFIG.generateEndpoint;\nq(&#039;[data-s=&quot;work&quot;]&#039;).hidden=true;var d=q(&#039;[data-s=&quot;done&quot;]&#039;);d.hidden=false;d.scrollIntoView({behavior:&quot;smooth&quot;,block:&quot;start&quot;});\n}).catch(function(err){\nvar es=v(&quot;es&quot;);es.hidden=false;\nes.innerHTML=\/encrypt\/i.test(String(err&amp;&amp;err.message))?&quot;&lt;strong&gt;This PDF is password-protected.&lt;\/strong&gt; Remove the password and upload it again.&quot;:&quot;&lt;strong&gt;The Factur-X could not be created.&lt;\/strong&gt; Check your connection and try again. If it keeps failing, export the invoice PDF again from your software.&quot;;\nes.focus();\n}).then(function(){go.disabled=false;go.textContent=lbl});\n});\nfunction restart(){\nform.reset();v(&quot;lines&quot;).innerHTML=&quot;&quot;;addLine();cond();\nqa(&quot;.inv&quot;).forEach(function(l){l.classList.remove(&quot;inv&quot;)});v(&quot;es&quot;).hidden=true;\nif(st.url)URL.revokeObjectURL(st.url);st={file:null,bytes:null,url:null,out:null,xurl:null};v(&quot;frame&quot;).removeAttribute(&quot;src&quot;);\nq(&#039;[data-s=&quot;done&quot;]&#039;).hidden=true;q(&#039;[data-s=&quot;work&quot;]&#039;).hidden=true;q(&#039;[data-s=&quot;up&quot;]&#039;).hidden=false;q(&#039;[data-s=&quot;up&quot;]&#039;).scrollIntoView({behavior:&quot;smooth&quot;,block:&quot;center&quot;});\n}\naddLine();cond();\nfunction syncFrenchRequired(){\nvar required=val(&quot;s_country&quot;)===&quot;FR&quot;;\nqa(&quot;[data-fr-required]&quot;).forEach(function(e){e.hidden=!required;});\n[&quot;s_endpoint&quot;,&quot;b_endpoint&quot;,&quot;fr_recovery&quot;,&quot;fr_late&quot;,&quot;fr_discount&quot;].forEach(function(n){F(n).setAttribute(&quot;aria-required&quot;,String(required));});\nv(&quot;frRequiredNote&quot;).textContent=required?&quot;All three statements are required for invoices from a seller in France.&quot;:&quot;These statements are optional for sellers outside France.&quot;;\n}\nF(&quot;s_country&quot;).addEventListener(&quot;change&quot;,syncFrenchRequired);\nsyncFrenchRequired();\nroot.__dnfx={buildXML:buildXML,embed:embed,calc:calc,validate:validate,take:take};\n})();\"><\/div>\n<script>(function(){var e=document.getElementById(\"dnfx-js\");if(e)(new Function(e.getAttribute(\"data-js\")))()})()<\/script>\n\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull is-layout-constrained wp-container-core-group-is-layout-f3e2c5ac wp-block-group-is-layout-constrained\" style=\"padding-top:8px;padding-right:24px;padding-bottom:64px;padding-left:24px\">\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-191125a4 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-group has-border-color has-background is-layout-constrained wp-container-core-group-is-layout-f00a39e0 wp-block-group-is-layout-constrained\" style=\"border-color:#e3ece8;border-width:1px;border-radius:14px;background-color:#f7fbfa;padding-top:22px;padding-right:22px;padding-bottom:22px;padding-left:22px\"><h4 class=\"wp-block-heading\" style=\"margin-top:0;margin-bottom:6px;font-size:17px\">Your PDF is not stored<\/h4><p class=\"wp-block-paragraph\" style=\"color:#5f707b;font-size:14px\">The file is processed only to create your Factur-X and is not kept after you leave the page.<\/p><\/div><\/div>\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-group has-border-color has-background is-layout-constrained wp-container-core-group-is-layout-f00a39e0 wp-block-group-is-layout-constrained\" style=\"border-color:#e3ece8;border-width:1px;border-radius:14px;background-color:#f7fbfa;padding-top:22px;padding-right:22px;padding-bottom:22px;padding-left:22px\"><h4 class=\"wp-block-heading\" style=\"margin-top:0;margin-bottom:6px;font-size:17px\">EN 16931 checks<\/h4><p class=\"wp-block-paragraph\" style=\"color:#5f707b;font-size:14px\">Required fields, SIREN, VAT numbers, VAT categories and totals are checked before the file is created.<\/p><\/div><\/div>\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-group has-border-color has-background is-layout-constrained wp-container-core-group-is-layout-f00a39e0 wp-block-group-is-layout-constrained\" style=\"border-color:#e3ece8;border-width:1px;border-radius:14px;background-color:#f7fbfa;padding-top:22px;padding-right:22px;padding-bottom:22px;padding-left:22px\"><h4 class=\"wp-block-heading\" style=\"margin-top:0;margin-bottom:6px;font-size:17px\">Hybrid PDF + XML<\/h4><p class=\"wp-block-paragraph\" style=\"color:#5f707b;font-size:14px\">The invoice data is embedded as factur-x.xml, the format expected by French e-invoicing platforms.<\/p><\/div><\/div>\n<\/div>\n\n<\/div>\n\n\n\n<div id=\"docnova-ocr\" class=\"wp-block-group alignfull has-background is-layout-constrained wp-container-core-group-is-layout-f8effeb9 wp-block-group-is-layout-constrained\" style=\"background-color:#0f2b46;padding-top:72px;padding-right:24px;padding-bottom:72px;padding-left:24px\">\n\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-02e41962 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:52%\"><p class=\"wp-block-paragraph\" style=\"color:#6bd5ac;font-size:13px;font-weight:700\">Docnova OCR, available in the portal<\/p><h2 class=\"wp-block-heading has-text-color\" style=\"color:#ffffff;margin-top:8px;margin-bottom:16px;font-size:40px\">Don&#8217;t want to enter all these fields manually?<\/h2><p class=\"wp-block-paragraph\" style=\"color:#d7e2e8;font-size:17px\">Upload your PDF in the Docnova Portal. OCR reads the invoice and fills in every field for you. You review the result and confirm with one click.<\/p><ul class=\"wp-block-list has-text-color\" style=\"color:#e4edf1;font-size:14px\"><li>Invoice number and dates<\/li><li>Seller and buyer data, including SIREN and VAT numbers<\/li><li>VAT categories and rates<\/li><li>Line items and totals<\/li><li>Payment details<\/li><\/ul><div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\"><div class=\"wp-block-button\"><a class=\"wp-block-button__link has-text-color has-background wp-element-button\" href=\"https:\/\/app.docnova.ai\/register\" style=\"border-style:none;border-width:0px;border-radius:9px;color:#ffffff;background-color:#2db486\">Fill automatically with OCR<\/a><\/div><\/div><\/div>\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:48%\"><div class=\"wp-block-group has-border-color has-background is-layout-constrained wp-container-core-group-is-layout-6fa1ef15 wp-block-group-is-layout-constrained\" style=\"border-color:#173b5b;border-width:1px;border-radius:22px;background-color:#173b5b;padding-top:32px;padding-right:32px;padding-bottom:32px;padding-left:32px\"><p class=\"has-text-align-center wp-block-paragraph\" style=\"color:#91e1c4;font-size:13px;font-weight:700\">Automated flow<\/p><h3 class=\"wp-block-heading has-text-align-center has-text-color\" style=\"color:#ffffff;margin-top:0;margin-bottom:12px;font-size:28px\">PDF, OCR, review, Factur-X<\/h3><p class=\"has-text-align-center wp-block-paragraph\" style=\"color:#d7e2e8;font-size:14px\"><strong>1.<\/strong> Upload your PDF<br><strong>2.<\/strong> OCR reads the invoice<br><strong>3.<\/strong> Fields are filled automatically<br><strong>4.<\/strong> You review and confirm<br><strong>5.<\/strong> Your Factur-X is ready<\/p><p class=\"has-text-align-center wp-block-paragraph\" style=\"color:#6bd5ac;font-size:17px;font-weight:700\">No field-by-field entry. Just review and confirm.<\/p><\/div><\/div>\n<\/div>\n\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull has-background is-layout-constrained wp-container-core-group-is-layout-52d0119f wp-block-group-is-layout-constrained\" style=\"background-color:#f7fbfa;padding-top:68px;padding-right:24px;padding-bottom:68px;padding-left:24px\">\n<h2 class=\"wp-block-heading has-text-align-center\" style=\"margin-top:0;margin-bottom:12px;font-size:36px\">Manual conversion or automatic processing?<\/h2>\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-f34569c6 wp-block-columns-is-layout-flex\" style=\"margin-top:28px\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-group has-border-color has-background is-layout-constrained wp-container-core-group-is-layout-940dfb54 wp-block-group-is-layout-constrained\" style=\"border-color:#dfe8e4;border-width:1px;border-radius:18px;background-color:#ffffff;padding-top:28px;padding-right:28px;padding-bottom:28px;padding-left:28px\"><p class=\"wp-block-paragraph\" style=\"color:#1f9a72;font-size:12px;font-weight:700\">Free converter<\/p><h3 class=\"wp-block-heading\" style=\"margin-top:0;margin-bottom:12px;font-size:24px\">Manual PDF to Factur-X<\/h3><ul class=\"wp-block-list\"><li>Upload your PDF<\/li><li>Enter the invoice data yourself<\/li><li>Validate the fields<\/li><li>Download your Factur-X<\/li><\/ul><div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\"><div class=\"wp-block-button\"><a class=\"wp-block-button__link has-text-color has-background wp-element-button\" href=\"#convert\" style=\"border-radius:9px;color:#ffffff;background-color:#1f9a72\">Start converting<\/a><\/div><\/div><\/div><\/div>\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-group has-border-color has-background is-layout-constrained wp-container-core-group-is-layout-940dfb54 wp-block-group-is-layout-constrained\" style=\"border-color:#9ed8c2;border-width:1px;border-radius:18px;background-color:#eef8f4;padding-top:28px;padding-right:28px;padding-bottom:28px;padding-left:28px\"><p class=\"wp-block-paragraph\" style=\"color:#167453;font-size:12px;font-weight:700\">Docnova Portal, paid automation<\/p><h3 class=\"wp-block-heading\" style=\"margin-top:0;margin-bottom:12px;font-size:24px\">OCR-powered Factur-X<\/h3><ul class=\"wp-block-list\"><li>Upload your PDF<\/li><li>OCR fills in every field<\/li><li>Review and confirm with one click<\/li><li>Download or send your Factur-X from the portal<\/li><\/ul><div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\"><div class=\"wp-block-button\"><a class=\"wp-block-button__link has-text-color has-background wp-element-button\" href=\"https:\/\/app.docnova.ai\/register\" style=\"border-style:none;border-width:0px;border-radius:9px;color:#ffffff;background-color:#1f9a72\">Go to Docnova Portal<\/a><\/div><\/div><\/div><\/div>\n<\/div>\n\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull is-layout-constrained wp-container-core-group-is-layout-39a03026 wp-block-group-is-layout-constrained\" style=\"padding-top:68px;padding-right:24px;padding-bottom:68px;padding-left:24px\">\n<h2 class=\"wp-block-heading has-text-align-center\" style=\"margin-top:0;margin-bottom:10px;font-size:34px\">Created your Factur-X? Send it with Docnova.<\/h2><p class=\"has-text-align-center wp-block-paragraph\" style=\"color:#6c7b85;font-size:16px\">Creating the file and sending it are separate steps. In the Docnova Portal you can send your Factur-X to your customer and track it, without leaving the platform.<\/p><div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-3e41869c wp-block-buttons-is-layout-flex\"><div class=\"wp-block-button\"><a class=\"wp-block-button__link has-text-color has-background wp-element-button\" href=\"https:\/\/app.docnova.ai\/register\" style=\"border-style:none;border-width:0px;border-radius:9px;color:#ffffff;background-color:#1f9a72\">Send from the Docnova Portal<\/a><\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull has-background is-layout-constrained wp-container-core-group-is-layout-d078bca3 wp-block-group-is-layout-constrained\" style=\"background-color:#f7fbfa;padding-top:68px;padding-right:24px;padding-bottom:68px;padding-left:24px\">\n<h2 class=\"wp-block-heading has-text-align-center\" style=\"margin-top:0;margin-bottom:12px;font-size:36px\">What changes when a PDF becomes Factur-X?<\/h2><p class=\"has-text-align-center wp-block-paragraph\" style=\"color:#6c7b85;font-size:16px\">The invoice still looks like the PDF you already use. The difference is the structured data added for machine processing.<\/p>\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-f921e6a0 wp-block-columns-is-layout-flex\" style=\"margin-top:26px\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-group has-background is-layout-constrained wp-container-core-group-is-layout-26a738c0 wp-block-group-is-layout-constrained\" style=\"border-radius:16px;background-color:#f6f8f9;padding-top:24px;padding-right:24px;padding-bottom:24px;padding-left:24px\"><h3 class=\"wp-block-heading\">Standard PDF<\/h3><p class=\"wp-block-paragraph\">Designed for people to read. Software has to retype the data by hand.<\/p><\/div><\/div>\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-group has-background is-layout-constrained wp-container-core-group-is-layout-26a738c0 wp-block-group-is-layout-constrained\" style=\"border-radius:16px;background-color:#eef8f4;padding-top:24px;padding-right:24px;padding-bottom:24px;padding-left:24px\"><h3 class=\"wp-block-heading\">Factur-X<\/h3><p class=\"wp-block-paragraph\">A readable PDF with structured XML invoice data inside, so both people and accounting software can use it.<\/p><\/div><\/div>\n<\/div>\n\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull is-layout-constrained wp-container-core-group-is-layout-d078bca3 wp-block-group-is-layout-constrained\" style=\"padding-top:68px;padding-right:24px;padding-bottom:68px;padding-left:24px\">\n<h2 class=\"wp-block-heading has-text-align-center\" style=\"margin-top:0;margin-bottom:12px;font-size:36px\">Frequently asked questions<\/h2><details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Can I convert an existing PDF invoice to Factur-X?<\/summary><p class=\"wp-block-paragraph\">Yes. Upload the PDF, enter the invoice information, and the converter checks the required fields before creating your Factur-X file.<\/p><\/details><details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Does the free converter read my PDF automatically?<\/summary><p class=\"wp-block-paragraph\">No. The free converter is for manual entry: you use the PDF as a reference and fill in the fields yourself. Automatic reading with OCR is available in the Docnova Portal.<\/p><\/details><details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>What does the converter check?<\/summary><p class=\"wp-block-paragraph\">Required EN 16931 fields, SIREN and VAT number formats, VAT categories and exemption reasons, payment details, and that line totals, VAT and the grand total add up.<\/p><\/details><details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Is my PDF stored?<\/summary><p class=\"wp-block-paragraph\">No. Your PDF is used only to create the Factur-X file and is not kept after you leave the page.<\/p><\/details><details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Do I need to know XML?<\/summary><p class=\"wp-block-paragraph\">No. You fill in normal invoice fields. The structured XML is created from what you enter.<\/p><\/details><details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>How do I send the Factur-X?<\/summary><p class=\"wp-block-paragraph\">Creating the file and sending an in-scope invoice through the required French e-invoicing channels are separate steps. You can send your Factur-X from the Docnova Portal.<\/p><\/details>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Konvertieren Sie Ihre PDF-Rechnung kostenlos in Factur-X: laden Sie Ihre PDF-Datei hoch, f\u00fcllen Sie die Rechnungsfelder aus, validieren Sie sie und laden Sie eine PDF-Datei mit eingebettetem XML-Format EN 16931 herunter.<\/p>","protected":false},"author":263848013,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","content-type":"","_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"jetpack_seo_llms_txt_always_include":false,"_wpcom_ai_launchpad_about_page":false,"_wpcom_ai_launchpad_gallery_page":false,"_wpcom_ai_launchpad_contact_page":false,"_wpcom_ai_launchpad_events_page":false,"_wpcom_ai_launchpad_video_page":false,"_wpcom_ai_launchpad_portfolio_piece":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"footnotes":""},"class_list":["post-18354","page","type-page","status-publish","hentry"],"acf":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false,"smart-post-landscape":false,"smart-post-portrait":false,"newspack-article-block-landscape-large":false,"newspack-article-block-portrait-large":false,"newspack-article-block-square-large":false,"newspack-article-block-landscape-medium":false,"newspack-article-block-portrait-medium":false,"newspack-article-block-square-medium":false,"newspack-article-block-landscape-intermediate":false,"newspack-article-block-portrait-intermediate":false,"newspack-article-block-square-intermediate":false,"newspack-article-block-landscape-small":false,"newspack-article-block-portrait-small":false,"newspack-article-block-square-small":false,"newspack-article-block-landscape-tiny":false,"newspack-article-block-portrait-tiny":false,"newspack-article-block-square-tiny":false,"newspack-article-block-uncropped":false},"uagb_author_info":{"display_name":"einvoicegermany.com","author_link":"https:\/\/docnova.ai\/de\/author\/melacore2204\/"},"uagb_comment_info":0,"uagb_excerpt":"Convert your PDF invoice to Factur-X for free: upload your PDF, fill in the invoice fields, validate and download a PDF with embedded EN 16931 XML.","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/PgxCJX-4M2","_links":{"self":[{"href":"https:\/\/docnova.ai\/de\/wp-json\/wp\/v2\/pages\/18354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docnova.ai\/de\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docnova.ai\/de\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docnova.ai\/de\/wp-json\/wp\/v2\/users\/263848013"}],"replies":[{"embeddable":true,"href":"https:\/\/docnova.ai\/de\/wp-json\/wp\/v2\/comments?post=18354"}],"version-history":[{"count":22,"href":"https:\/\/docnova.ai\/de\/wp-json\/wp\/v2\/pages\/18354\/revisions"}],"predecessor-version":[{"id":18625,"href":"https:\/\/docnova.ai\/de\/wp-json\/wp\/v2\/pages\/18354\/revisions\/18625"}],"wp:attachment":[{"href":"https:\/\/docnova.ai\/de\/wp-json\/wp\/v2\/media?parent=18354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}