XML underpins electronic invoices, sitemaps, configuration files, feeds and data exchanged between business systems. Reading it raw, often on one long line, is hard work. XML to PDF indents the elements to reveal the document's structure and lays the result out on pages in a monospaced font, so the file can be reviewed, annotated or archived.
How to use XML to PDF
- Add the .xml file.
- Select Convert to PDF.
- Download the PDF.
- Follow the indentation to review nested elements.
How the XML is formatted
- Parsed and re-indented: When the file is well-formed, VelloDoc parses it and re-indents each element by two spaces per level, so parent and child elements line up clearly. Attributes, text and comments are kept.
- Existing whitespace: Whitespace already present between elements can occasionally add blank lines, which doesn't affect the content.
- Monospaced and wrapped: The output is shown as monospaced text, with long lines wrapping onto the next line instead of running off the page.
Not a stylesheet transformation
- It shows the XML itself: This tool shows the XML itself, not a designed document.
- Formats meant for XSLT: Formats like electronic invoices may be meant for display through an XSLT stylesheet that turns data into a formatted page, and that transformation isn't applied here.
- If it isn't well-formed: If the file isn't well-formed, for example because a closing tag is missing, it's converted exactly as written without any reformatting.
Related data conversions
- For tabular data: For data that's really tabular, a CSV export converted with CSV to PDF is easier to read.
- JSON and saved logs: JSON files have their own formatter in JSON to PDF, and saved HTML renders as a page with HTML to PDF.
- Where to read more: The format guide covers which format suits which reader.
When people use XML to PDF
Configuration reviews
Print or share application and server configuration files for a structured review.
Sitemaps and feeds
Inspect a sitemap or product feed as indented pages instead of a single unreadable line.
Data exchange records
Keep a readable copy of the XML messages exchanged with a partner system for your records.
Limitations to know
XML to PDF shows markup as indented monospaced text and doesn't apply XSLT stylesheets. Malformed files are converted without formatting, and pretty-printing can add blank lines. WeasyPrint is needed on the server.
XML to PDF: common questions
Will the XML be indented?
Yes, when it's well-formed. Each nested level is indented by two spaces.
What if my XML has errors?
Files that can't be parsed are converted exactly as written, without reformatting.
Will an XML invoice look like a normal invoice?
No. The tool shows the XML markup. Presenting an invoice as a formatted document requires the stylesheet designed for that invoice format.
Why is this tool unavailable on some servers?
It needs the WeasyPrint library to render pages. When a server lacks it, the tool says so clearly.