The PDF version the file declares

Choose the version the document announces, from 1.4 to 2.0, by what it carries and by the age of the software reading it.

Summary

The PDF format has several generations, the way cars have model years. The first line of the file announces its own, and it is a promise: here is what you need to know how to do in order to show me whole. Software older than the version announced shows what it can and leaves the rest aside, quietly — which is why the choice is worth making rather than inheriting.

Technically

Written at the top level of a request, under "version"

version sets the version the first line of the file declares. Each version brings what the library writes: 1.4 transparency, tagged content and the metadata packet; 1.5 layers, two-page spreads and the sliding transitions; 1.6 opening on the list of attachments and print scaling; 1.7 the wishes a print dialogue reads; 2.0 taking the print size away from the reading software. Nothing is raised on the customer's behalf: a document declaring less than what it carries is refused when written, naming what asked for more.

Request schema

  • version — string, optional. Absent, the document is written as 1.7.
  • Five values: "1.4", "1.5", "1.6", "1.7", "2.0".
  • archive settles the version on its own side: pdfa3b imposes 1.7, pdfa4 imposes 2.0. A version written in the request is applied afterwards.
  • Known demands: layers and object streams want 1.5; the print wishes of reading want 1.7; reading.lock_actual_size and the annotations and widgets tab orders want 2.0.

A whole request that creates a PDF

{
  "version": "2.0",
  "standard_fonts": [{ "name": "sans", "face": "helvetica" }],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 762 },
      "content": ["This file announces PDF 2.0"],
      "font": "sans",
      "font_size": 14
    }
  ]
}

The line that sends it, in three languages

The document as a whole

The numbers reading software shows A hundred letters in a single file What the document says about itself What the document says about itself, said once The notes a program leaves in the file for itself The notes a program leaves on one page The data a program hangs on a run of ink A file still readable decades from now The print standard the document claims The password that opens it, and what may be done with it An invoice a person and a machine both read The address relative links are read against What a picture says about itself, and how it is read The attachments the document carries beside its pages The attachments shown as a portfolio Which attachments a page claims The identity card a single page carries The accessibility standard the document claims The standards the finished document is measured against

Where to go next

Every JSON key of a request, in one page The other forty-one settings of a request

See the prices See the examples