Which Attachments a Font Claims
Tie files to one font of the document — the licence it is used under, the whole face it was cut down from — so they travel with it.
Summary
A font bought for a document comes with papers: the licence that says what the buyer may do with it, sometimes the complete face the document only uses a few letters of. Attached to the document as a whole, those papers say nothing about which font they belong to. Tied to the font itself, they stay with it for whoever takes the file apart later.
Technically
Written at the top level of a request, under
"font_files"
font_files writes /AF on the stream holding the font's program, or on the font dictionary of a face the request draws itself. Each entry names the font it is for, by the name items draw with it by, and the files it claims among attachments. A font named twice claims the files of the last entry given for it. A name no item draws with is refused, and so is a font whose program the file does not carry: one of the fourteen standard fonts, one named in fonts_described_only, or one left out by font_permissions.
Request Schema
-
font_files— array, optional, empty by default. -
font_files[].font— string, required. The name items draw with the font by. -
font_files[].files— array of strings, required. The names of the declared attachments the font claims. Each must name one ofattachments.
Tying a file to anything but the document as a whole is PDF 2.0, so a request doing it declares "version": "2.0".
A Whole Request That Creates a PDF
One name below stands for a font file: put the encoded file in its place, or send the file itself beside the description, as a supplied part of the same call. One page carries a real font already encoded, and its request posts as it stands.
{
"version": "2.0",
"attachments": [
{
"name": "statement_4711",
"file_name": "body-licence.xml",
"description": "The licence the body face is used under",
"media_type": "text/xml",
"relationship": "supplement",
"modified": "2026-08-03T09:15:00+02:00"
}
],
"fonts": [{ "name": "body", "data": "PASTE_THE_FONT_FILE_BASE64_HERE" }],
"font_files": [{ "font": "body", "files": ["statement_4711"] }],
"items": [
{
"type": "text",
"rect": { "llx": 72, "lly": 700, "urx": 523, "ury": 740 },
"content": ["A face that carries its own licence"],
"font": "body",
"font_size": 12
}
]
}
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 Text Nobody Can Copy 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 Variable 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 The PDF Version the File Declares The Extensions to PDF the File Says It Uses What a Picture Says about Itself, and How It Is Read The Attachments the Document Carries Beside Its Pages Files the Document Names without Carrying The Attachments Shown as a Portfolio Which Attachments a Page Claims The Identity Card a Single Font Carries Which Attachments the Document's Card Claims A Document Card Written Elsewhere The Areas of a Page a Reader Measures In 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