Convert YAML to PDF

Turn YAML 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 YAML files on the dialor turn it to pick what to do

Every key and value, on printed pages.Your YAML is typeset as a PDF with each key and value kept as written.

  1. What you get

    A single PDF on A4 pages. Each object lists its plain values first as key: value. Small objects and lists of plain values are nested under their key.

    Larger parts follow under headings named after their keys, down to six levels, and as nested lists below that. If the file holds several documents, they become a numbered list.

  2. Lists become tables

    A list of objects that hold only plain values becomes one table. It has a column for every key in the order the keys first appear, and 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 objects of any other list each get a heading numbered from 1.

  3. What is kept and changed

    Every key and value is written exactly as the file has it. Long numbers are not rounded and dates stay text. Values such as yes, on, 0755, ~ and 2024-03-01 appear as they are, and a custom tag such as !Ref stays in front of its value.

    Aliases are expanded. A merge key (<<) stays an ordinary key. Comments are dropped.

  4. Page size and limits

    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 default is a4, which is 210 × 297 mm.

    More than 100,000 values fail with resource_limit. A key repeated in one mapping fails with input_corrupted.

YAML 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 · YAML

YAML

YAML configuration and data files.

Extensions
.yaml .yml
MIME type
application/yaml
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 YAML to PDF conversion through the API, for your app or your agent.

terminal
$ cv convert report.yaml report.pdf
$ cv convert report.yaml report.pdf

Questions.What people ask about YAML to PDF.

01OF 04

No. Comments are dropped. Every key and value is kept.

No. Values such as yes, on, 0755, ~ and 2024-03-01 are written as they appear in the file.

A key is repeated in one mapping. The conversion stops with input_corrupted in that case.

Yes. Set Page size to letter. The default is a4.

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