The identity card a single page carries
Give one page its own title, author, subject and dates, so a document cut back into pieces keeps each piece's identity.
In plain words
Written for anybody. It says what this puts on a sheet of paper, and asks nothing of you beyond that.
A document has an identity card: a title, an author, a subject, a date. When one PDF holds a hundred separate things — a register of sittings, a run of statements — one card for the whole is not enough. Each page can carry its own. Cut the document back into pieces and every piece still says who wrote it, when, and about what. It is the same information as the document's own card, written for one page instead of for all of them.
For a developer
Written for somebody who writes the calling program: the model, the units, and the settings that carry the weight.
Written at the top level of a request, under
"page_metadata"
page_metadata gives a page a packet of its own, in the same shape as the document's. Two forms are accepted: facts, the fields written out — title, author, subject, keywords, the dates — from which the packet is built; or packet, a packet already written, carried across as it stands. A page named twice carries the last packet given for it. The document's own packet is untouched: this adds a card to a page, it does not replace the one on the front.
Every key, with its default
The reference: which keys are required, which are optional, what each one defaults to and which combinations the server declines.
-
page_metadata— array, optional, empty by default. -
page_metadata[].page— integer, required, counting from 1, as every page number in a request counts. -
page_metadata[].metadata— object, required. Eitherfacts, an object of the fields the document's own card takes (title,author,subject,keywords,created,modified), orpacket, a packet already written and carried across unchanged.
Scope: the pages named. A page named twice carries the last packet given for it. metadata settles the document's own card and is not touched by this.
A whole request that draws it
Post this as it stands and a PDF comes back. Nothing has been left out of it.
{
"page_metadata": [
{
"page": 1,
"metadata": {
"facts": {
"title": "First sitting",
"author": "R. Delaunay, clerk",
"subject": "One sitting of the register",
"created": "1911-03-14T09:00:00+01:00"
}
}
}
],
"standard_fonts": [{ "name": "sans", "face": "helvetica" }],
"items": [
{
"type": "text",
"rect": { "llx": 72, "lly": 700, "urx": 523, "ury": 740 },
"content": ["A page carrying an identity card of its own"],
"font": "sans",
"font_size": 12
}
]
}
The document as a whole
The numbers the reader shows A hundred letters in a single file What the document says about itself A file still readable in thirty years An invoice a person and a machine both read The address relative links are read against The PDF version the file declares What an image says about itself Files the document carries beside its pages Which carried files a page claims The accessibility standard the document claims
Where to go next
Every key of a request, in one page The other thirty-two settings of a request
Glossary
- the identity card of a file
- The block inside a file that says what the file is: its title, who made it, when, and which rules it follows. Search engines and archives read it; a reader never sees it. Its technical name is XMP.
- request
- One call to the service: you send what the document should say, and get the document back. Your bill counts these calls, one for each document. The number of pages inside a document is never counted.