Convert XML to PDF
Turn XML files into PDF. Typeset on A4 pages unless page_size says letter, with long tables running across pages under a repeated header row.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop XML files on the dialor turn it to pick what to do
Your XML as a readable PDF.Every key and value is written out on A4 pages, with tables where the data is a list.
What you get
One PDF typeset on A4 pages. Set Page size to letter for 8.5 × 11 in pages, or to auto so each page takes the size of its own content.
The root element becomes the first heading. Each element lists its plain values first as key: value. Larger parts follow under headings named after their keys, down to six levels and as nested lists below that.
How the structure is laid out
Attributes become keys that start with @. Repeated elements become a list, while a lone element stays a single value. Text that sits beside child elements goes under #text.
A list of elements that hold only plain values becomes one table, with a column for every key in the order the keys first appear. Numbers are aligned right. Long tables run across pages under a repeated header row. A list of lists of plain values becomes a table without a header row. The items of any other list each get a heading, numbered from 1.
What is lost
Every key and value is kept exactly as the file has it. Long numbers are not rounded and dates stay text.
Comments and processing instructions are lost. So is the position of text between child elements. An empty element is left empty.
A file with more than 100,000 values stops with
resource_limit.
XML and PDF.What each format is, and the options this conversion takes.
- 01 · page_size
Page size
The size of the pages written. A4 is the standard in most of the world and Letter in North America.
a4210 × 297 mm.letter8.5 × 11 in.autoEach page takes the size of its own content.
The formats
XML
XML documents and data.
- Extensions
- .xml
- MIME type
- application
/xml - Kind
- Text and data
Fixed-layout pages that look the same everywhere. The exchange format for anything that will be printed or signed.
- Extensions
- MIME type
- application
/pdf - Kind
- Documents
In your code.The same XML to PDF conversion through the API, for your app or your agent.
$ cv convert report.xml report.pdf$ cv convert report.xml report.pdfQuestions.What people ask about XML to PDF.
No. Every key and value is written exactly as the file has it. Long numbers are not rounded and dates stay text.
Attributes become keys that start with @. Text next to child elements goes under #text.
No. Comments and processing instructions are lost, along with the position of text between child elements.
The file has more than 100,000 values. The conversion stops with resource_limit at that point.