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.

  1. 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.

  2. 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.

  3. 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.

  1. 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.

    • a4 210 × 297 mm.
    • letter 8.5 × 11 in.
    • auto Each page takes the size of its own content.
    a4 · letter · auto default a4

The formats

From · XML

XML

XML documents and data.

Extensions
.xml
MIME type
application/xml
Kind
Text and data
To · PDF

PDF

Fixed-layout pages that look the same everywhere. The exchange format for anything that will be printed or signed.

Extensions
.pdf
MIME type
application/pdf
Kind
Documents

In your code.The same XML to PDF conversion through the API, for your app or your agent.

terminal
$ cv convert report.xml report.pdf
$ cv convert report.xml report.pdf

Questions.What people ask about XML to PDF.

01OF 04

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.

More conversions.Other ways in and out of XML and PDF.