GALAXY OF TOOLS

PDF SECTOR

XML to PDF Converter

Print XML as a colour-coded, indented tree with line numbers, or turn repeating records into PDF tables.

.pdf
Preview

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

Make a readable PDF from any XML file

The XML to PDF converter prints XML the way people want to read it: as a neatly indented, colour-coded tree with line numbers, or as tables built from repeating records such as invoices, orders, products or feed items. Use it to attach an e-invoice or SOAP message to a support ticket, give a configuration file to an auditor, or archive a data export in a format anyone can open.

Printing XML from a browser usually gives one long unwrapped line or a collapsed tree. This tool re-indents the document, wraps long lines inside the margins, colours tags, attributes, values, comments and CDATA differently, and numbers every page. The PDF keeps real text, so it can be searched and copied later.

The file is checked by your browser’s XML parser and the PDF is built with the open-source jsPDF library and its AutoTable plug-in (both MIT licence) — all on your device, with nothing uploaded.

How to use the XML to PDF Converter

  1. Paste XML into XML input or press Open file. If the XML is not well-formed, the error is shown with its line and column.
  2. Choose XML tree (coloured) to print the markup itself, or Tables to print the data with repeating elements as tables.
  3. Pick the page size, orientation, font size and indent.
  4. Add a title and file name, and choose line numbers, page numbers and colours.
  5. Check the preview and press Create PDF. The PDF downloads straight away.

XML to PDF Converter features

Coloured, indented tree

Tag names, attribute names, attribute values, text, comments, CDATA and processing instructions each have their own colour, and every level is indented by the amount you choose.

Repeating elements as tables

In table layout, elements that repeat — every <sale>, <item> or <entry> — become one table with attributes as @ columns and nested values as dotted columns such as amount.@currency.

Nothing silently dropped

The XML declaration, comments, CDATA sections, processing instructions and the DOCTYPE line are printed in the tree; attribute values and text appear exactly as written, with entities shown escaped.

Long lines handled

Lines wider than the page wrap inside the margins and are indented under their start; only the first part is numbered, so line numbers stay meaningful.

Unicode text

Names and values in Greek, Cyrillic or with symbols like ₹ print with an embedded Noto font (SIL Open Font License) and stay selectable. Scripts outside that font, such as Chinese or Devanagari, are flagged.

Print settings

A4, US Letter, US Legal or A3 in portrait or landscape, 7–12 pt text, a title with a running header on later pages, “Page X of Y” footers and a black-and-white option.

Tree or tables?

In table layout an element that occurs once becomes a heading with a key/value table of its attributes and simple children, and every nested group gets its own heading, indented by depth. Text is shown decoded there, so &amp; prints as &.

Your XMLBest layoutWhat you get
A SOAP request or response for a ticketXML treeThe exact message with line numbers to point at
A UBL invoice or purchase orderTablesHeader fields as key/value tables, invoice lines as a table
An RSS feed or sitemapTablesOne row per item or URL with its title, link and date
A Maven, Spring or .NET configuration fileXML treeThe structure with comments, ready for review
A product or price exportTablesA printable catalogue-style table

What the tree view changes and what it keeps

To clean up or validate the XML before printing, use the XML Formatter. For a spreadsheet instead of a PDF, use XML to CSV; for JSON data, JSON to PDF. Combine several PDFs afterwards with Merge PDF.

  • Changed: indentation is rebuilt from the structure, and whitespace-only text between tags is not printed. Short text elements stay on one line, like <item>Clean Code</item>.
  • Kept: element and attribute order, namespace prefixes and xmlns declarations, text and attribute values, comments, CDATA sections and processing instructions.
  • Shown escaped: &, < and > are printed as entities, as in valid XML; numeric references such as &#x20B9; print as the character ₹.
  • Not printed: the internal subset of a DOCTYPE declaration — only its name and identifiers appear.

XML to PDF Converter FAQ

How do I convert XML to PDF?

Paste the XML or open the .xml file, choose XML tree or Tables, set the page options and press Create PDF. The XML to PDF conversion runs in a second or two and the file downloads automatically.

Can I print XML with colours and line numbers?

Yes — that is the XML tree layout. Tags, attributes, values, comments and CDATA are coloured, and each line of the formatted XML is numbered. Untick Colours for black-and-white printing.

How does the table layout decide what becomes a table?

Elements that repeat under the same parent become the rows of one table. Each attribute becomes a column starting with @, child elements become columns, and deeper elements become dotted columns.

Is the text in the PDF searchable?

Yes. The PDF contains real text rather than pictures, so you can search it, select it and copy from it in any PDF reader.

Will non-English text print correctly?

Latin, Greek and Cyrillic text and symbols such as ₹, € and £ print correctly using an embedded Noto font. Chinese, Japanese, Devanagari and emoji are not covered, and the tool warns you when they are present.

Is my XML uploaded?

No. The XML is parsed and the PDF is generated in your browser. Only the PDF library and, when needed, the font file are downloaded.

You might also need