Skip to main content

PDF to XML

The PDF to XML page shows the XML a PDF produces, to start or adjust the mapping of a PDF-source document. It converts a text PDF from any system — JD Edwards, SAP, NetSuite, a custom ERP or any invoicing tool — or a JD Edwards tagged PDF, with or without a document's settings, and saves to the document the settings tried on the page. Nothing is stored by a conversion: the page is a working tool.

The settings are grouped in steps shown as cards across the top — Source, Invoice, Company, Lines, VAT summary, Result — each with its state. The selected step's settings sit on the left, beside the rows of the PDF and the XML it produces.

Access: Processing → PDF to XML. A PDF-source document also opens the page on itself from its Open in PDF to XML button, in the Documents editor.


At a glance​

PDF to XMLSee the XML a PDF produces, to start or adjust its mapping.⤒ Choose a PDFinvoices-2026-11.pdf⤓ Download XMLSave to documentConvertUnsaved changesSOURCEinvoices-2026-11.pdfINVOICE3 invoice(s)COMPANY00001LINES5 line(s) foundVAT SUMMARY3 VAT rate(s) foundRESULT2 invoice(s) to checkLinesClick rows of the PDF to mark the table of lines.Click the first row after the linesStart over5 line(s) foundTABLE STARTPRESTATIONHEADER ROWS1TABLE END^N° contratROWS IGNORED^Sous totalRows of the PDFRowsPDFFACTURE | N° : 36834.FU | Date : 12/11/2026ACME SERVICES12 rue des Lilas75011 PARISClient : Beta SARLPRESTATION | Qté | P.U. HT | Montant HTMaintenance | 1 | 900,00 | 900,00Support | 2 | 50,00 | 100,00Formation | 1 | 200,00 | 200,00N° contrat : C-2026-17Taux TVA | Base HT | TVA20,00 % | 1 200,00 | 240,00Total HT : 1 200,00 | Total TTC : 1 440,00FACTURE | N° : 36835.FU | Date : 12/11/2026<Documents><Document fichier="…" pages="1"><PagesPDF>1</PagesPDF><Date>2026-11-12</Date><Adresse_1>…</Adresse_1><Lignes><Ligne n="1"><PRESTATION>Maintenance<Qté>1</Qté><Montant_HT>900.00</Ligne><Ligne n="2">…</Ligne></Lignes><Recap_TVA><Ligne_TVA>…</Ligne_TVA></Recap_TVA><Total_HT>1200.00</Total_HT><Textes>…</Textes></Document>Choose a PDFconverted at onceSteps as cardseach with its stateSettings of the stepbeside the rows and the XMLClick the rowsheader · lines · end rowPending changesone Save to documentResult stepinvoices to check in redRows or PDFthe PDF itself on demandXML producedread-only, downloadable

Toolbar and steps​

ControlDescription
Choose a PDFPicks the PDF on the computer and converts it at once; its name is shown beside the button.
ConvertConverts again with the settings currently on the page, saved or not.
Unsaved changesOrange mark shown as soon as a setting is changed on the page: it is tried at once but not saved yet.
Save to documentWrites the pending settings to the document picked in the Source step (see Save to document). Enabled when changes are pending and a document is picked.
Download XMLSaves the XML as <pdf name>.xml.

Each card names its step and states where it stands, in green when found, in red when still to set:

StepThe card shows
SourceThe PDF chosen, or No PDF chosen.
InvoiceNumber … · Type … when the invoice number splits, N invoice(s) when the PDF is cut into invoices, else the invoice number or One invoice per PDF.
CompanyThe company code found or set, or Not set.
LinesN line(s) found, or No lines found. Text PDF only.
VAT summaryN VAT rate(s) found, or Not set. Text PDF only.
ResultN invoice(s) · N line(s), or N invoice(s) to check in red.

The steps after Source open once the PDF is converted. The rows read from the PDF are shown beside the settings of a text PDF; the Rows / PDF buttons at the top of that pane swap them for the PDF itself, to compare with what was read. A row is clicked in the Lines and VAT summary steps only; in the Result step, the list of invoices takes the place of the rows.


Source​

ControlDescription
Kind of PDFText PDF (a PDF whose text can be selected, from any generator) or JD Edwards PDF (a BI Publisher / JD Edwards print carrying its section and field tags).
DocumentDefault settings, or a document whose settings are loaded and tried. Picking a document also sets the kind: Text PDF for a PDF source, JD Edwards PDF otherwise, with the manifest of the watched folder that uses the document.
New documentCreates a document for the kind in use — Name (letters, digits, - and _) and Description. Its UBL XSLT points to <name>.xsl, to create in the XSL editor if needed; the settings tried on the page stay pending, ready for Save to document.

A scanned PDF (images without text) is refused with no text found … (scanned or empty PDF?).

JD Edwards PDF​

With JD Edwards PDF, the Source step adds two controls, and the Lines and VAT summary steps are hidden — the sections and fields come from the tags:

ControlDescription
ManifestServer path of the manifest that names the tags; empty = data dictionary names. The folder button browses the server.
Starter manifestDownloads a manifest built from the PDF, to complete.

A PDF without JD Edwards tags shows No JD Edwards tags in this PDF: it needs PDF compression turned off in the JDE INI.

A JD Edwards PDF can also be processed directly from Process Document on an XML-source document: it is converted with the document's invoice key and the manifest of its watched folder.


Invoice​

Text PDF​

ControlDescription
Invoice numberThe element holding the invoice number. A number such as 36834.FU (number then letters) or FU-36834 is split into Number and Type, both read from the label printed before the value.
Document typeShown when the number cannot be split: the fixed document type (e.g. RI).
Several invoicesFor a PDF holding several invoices: the rule that gives one document per invoice number (One invoice per PDF when empty). Split on this number builds it from the label of the invoice number; the count then shows N invoice(s).

JD Edwards PDF​

ControlDescription
Invoice keyFor a report that does not follow the standard invoice layout: the section:field holding the invoice number, shown with the number of distinct values. Gives one <Invoice> per value (burst key Invoice). None (standard sections) keeps the standard layout.
Burst key, Document ID, Document typePicked among the elements of the XML. The count shows N invoice(s).

Company​

ControlDescription
Find company byNot searched, VAT number, SIRET or SIREN.
Identifier in the invoiceShown when the company is searched: the element holding the identifier. The page shows the company found among the supplier companies (→ 00001), or why none matches.
CompanyWhen the company is not searched: a fixed company code for a text PDF, an element of the XML for a JD Edwards PDF.

Lines​

Table start, Header rows and Table end set the line table of a text PDF. The easiest way is to click the rows of the PDF, following the hint of the step:

  1. Click the first row of the table header;
  2. Click the last row of the table header;
  3. Click the first row after the lines.

The page writes the three settings and converts again: the header rows are framed in indigo, the lines in green, the end row in red, and the count shows N line(s) found. Start over clears the clicks.

A table printed in several sections, each closed by a subtotal, needs one more setting: Rows ignored, a regex typed by hand (e.g. ^Sous total) naming the rows inside the table that are not invoice lines. The table is then read to its end: set Table end on the row after the last section. The values printed on an ignored row stay available as fields of the document. When the header spans several rows (Header rows of 2 or more), each line also carries the title of its section, in <Section>. Left blank, the setting changes nothing; it can be tried on the page before saving.


VAT summary​

The same clicks set VAT table start, Columns and VAT table end: Click the header row of the VAT summary, Click its last column (one button per header cell — useful when another block is printed beside the summary), Click the first row after the rates. The rates become <Recap_TVA>/<Ligne_TVA>, and the count shows N VAT rate(s) found.


Result​

The Result step sums up what the document will process: N invoice(s) · N line(s), the VAT rates found, and a Download XML button.

For a text PDF, a table lists each invoice of the PDF:

ResultThe XML the document will process.3 invoice(s) · 5 line(s)2 invoice(s) to checkMontant_HT of the lines against Total_HT⤓ Download XMLINVOICEPAGESLINESVAT RATESSUM OF LINESTOTAL36834.FU1311200120036835.FU2-32136836.FU41—3005506000A click on a row shows that invoice in the XML.Invoices to checkno lines, or not adding upLines against totalcolumn and total found aloneLines don't add upsum and total in redNo lines readcheck the table anchors
ColumnDescription
InvoiceThe first value of the invoice — usually its number.
PagesThe pages of the PDF the invoice covers (2-3); for a PDF holding one invoice, its number of pages.
LinesThe number of lines read; in red when none.
VAT ratesThe number of rates read in its VAT summary.
Sum of linesThe sum of one amount column of the lines.
TotalThe total of the invoice it is compared with.

The column of the lines and the total are not settings: the page takes the pair that agrees on the most invoices — a column named like the total wins a tie — and names it above the table (Montant_HT of the lines against Total_HT). An invoice with no lines, or whose lines do not add up to its total, has its figures in red and is counted in N invoice(s) to check; Lines agree with the total on every invoice confirms the opposite. When no total matches the sum of the lines on any invoice, the page says so and only the invoices without lines are flagged.

A click on a row shows that invoice in the XML. The table can be searched, filtered and exported like the other lists of the application.


Save to document​

Save to document writes the pending settings to the document picked in the Source step. For a text PDF: table start, header rows, table end and rows ignored, VAT summary, invoice split, the number and type extraction rules, the company (or its lookup). A document without a burst key gets Document, one per invoice. For a JD Edwards PDF: the invoice key, burst key, document ID, type and company (or its lookup).

The Unsaved changes mark goes away once saved; a text PDF is then converted again with the saved settings. The same settings can be edited afterwards in the PDF extraction group of the document.


How a text PDF is read​

The conversion rebuilds the page layout and writes what it reads: labelled values, party blocks, the line table, the VAT summary and every printed row. The general rules are listed under What the XML holds; the cases below complete them.

Invoices printed with their business-term codes​

Some layouts print, beside each value, the code of its business term in the standard: Date d'échéance (BT-9), Total TVA (BT-110), Type de facture (BT-3). Such a layout is read by its labels:

  • The code is taken out of the label. A (BT-…), (BG-…) or (EXT-FR-FE-…) code, at the end of the label or in a cell of its own, is removed and the field is named after the label: Date d'échéance | (BT-9) | 31/01/2027 gives <Date_d_échéance>. A code printed just below its label, at the start of the next row, still belongs to that label.
  • Text values are kept. A coded label takes the next cell as its value, whatever it holds — currency, invoice type, payment means. When the next cell is another label, the field is written empty.
  • A code in parentheses also comes out on its own. A value ending on a short code gives a second element named …_code: Type de facture (BT-3) | Facture (380) gives <Type_de_facture>Facture (380)</Type_de_facture> and <Type_de_facture_code>380</Type_de_facture_code>; Euro (EUR) gives EUR. For an electronic address printed as @dresse électronique | 400208435 (0225), the element Adresse_électronique keeps the identifier and …_code its scheme.
  • Values printed on several rows are joined. A long value wrapped under itself is read as one; a long unbroken token cut by the width of the column (an identifier, a reference) goes on without a space.
  • A row of codes under a table header (TVA | (BT-118) | (BT-119) | …) is removed: it names the columns, it holds no value.

A URL, a URN or a colon inside a sentence in parentheses ((ou : …) is not taken for a Label : value pair.

Party blocks​

A party box whose first line is a block heading — Vendeur, Client, Acheteur, Fournisseur, Émetteur, Destinataire, Facturé à, Livraison, Livré à — writes that heading in <Titre>; the next line is the party's <Nom>. A city followed by a country code, CITY, FR, gives <Ville> and <Pays>.

Line tables​

  • One cell per column. A row with as many cells as the header has columns is read one cell per column, in order: a text left-aligned under a centred header goes to its own column, not to the one before it.
  • Name printed on two rows. In a table read by position (header on several rows, values stacked on their line), a value wrapped above and below its line — a long name — stays in its column; the other stacked values of the line keep theirs and are not read as section titles.
  • Table continued on the next page. The footer of the page and the header of the next page — the rows both pages print at the same height, digits aside (Page 1 / 2) — are not read as invoice lines.
  • Header printed again on a following page. On an invoice of several pages, the header fields a following page prints again are read once: no second set of fields ending in _2.
  • VAT summary with a two-row header. The other rows of a header printed on several rows are skipped before the first rate.

Access​

The page follows the Process Document page grant on the Roles page: a user who can process documents sees it.


Tips & best practices​

  • Start from a real PDF of each layout. One sample per layout is enough to set the table, the VAT summary and the key. A PDF holding several invoices is better still: the Result step checks them all at once.
  • Click rather than type the anchors. The page writes the shortest rule that finds the row, numbers turned into \d+, so the next PDF of the same layout matches too.
  • Check the Result step before saving. Every invoice should have lines that add up to its total; an invoice in red points to an anchor that misses rows or to a table that goes on over a page.
  • Switch to the PDF view when a value looks wrong. It shows the page as printed, beside the settings, to see whether a value is wrapped, stacked or printed in another block.
  • Search the company when one PDF layout serves several companies. The lookup by SIRET, SIREN or VAT number avoids one document per company; an identifier missing from the supplier companies stops the invoice.
  • Use the AI Auto-Map for the values the converter merges. Its extraction rules are saved on the document and show up here on the next conversion.