The Attachments the Document Carries Beside Its Pages

Carry whole files inside the PDF — the data an invoice was created from, the same statement in another form — each named, described and dated.

See It in a Real PDF

PDF/A-3u Meter Readings with Their Table Attached

A quarter's meter readings that a person reads on the page and a billing program takes from the table attached to the same file.

Open the PDF The Whole Example

Also shown in: A PDF/A-4f Statement with Its Data Attached · Three Statements in One File · A Tagged PDF/A-3a Schedule of Charges

Summary

A PDF can carry files inside it, the way an envelope carries a letter plus a form. Whoever opens the document sees a list of what it carries and can save any of it. This is what makes an electronic invoice work: the pages are the invoice a person reads, and the file carried inside is the same invoice in a form a program reads, so the two can never say different things. The thing that matters most on each attachment is what it is to the document: the file the document was created from, the same thing said another way, or something added to it.

Technically

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

attachments writes the files the document carries beside its pages into the /EmbeddedFiles name tree and associates them with the document through /AF, each named as the request claims it by, in the order they are carried. The bytes themselves arrive alongside the request, as a part under that name. relationship is the file's /AFRelationship, and it has no default and is required: nobody but the sender knows whether the file is the source the document was created from, an alternative saying the same thing in another form, the data behind it, or a supplement. modified is the /ModDate in the file's /Params, when the data in the file was last touched, not when the PDF was created. A page claims the files it belongs to through page_files, and an archival document carries them under the rules its standard sets.

Request Schema

  • attachments — array, optional, empty by default.
  • attachments[].name — string, required. The name of the supplied part carrying the file, which is also the name the rest of the request claims it by.
  • attachments[].file_name — string, required. The name the file is attached under, and the name reading software offers to save it as.
  • attachments[].description — string, required. What the file is, in words, for a person reading the list of what the document carries.
  • attachments[].media_type — string, required. The file's media type: text/xml for an XML document.
  • attachments[].relationship — string, required, no default. One of source, alternative, data, supplement, unspecified.
  • attachments[].modified — string, required, an ISO 8601 timestamp. When the data in the file was last changed, not when the PDF was created.
  • attachments[].thumbnail — string, optional, absent by default. The name of a supplied image that reading software shows for the file in its list of attachments, written as the /Thumb of the file specification. Its colours must be grey, red-green-blue or a palette of either, or the request is refused; a name no image was supplied under is refused too. It needs PDF 2.0.
  • attachments[].unlisted — boolean, optional, false by default. true leaves the file out of the document's list of attachments, so reading software does not offer it there; it is still carried and tied to whatever claims it, and an action opening it is refused.
  • attachments[].folder — integer, optional. The number of the collection.folders folder the file is placed in; absent places it in the root folder. A number no folder carries is refused, and so is a folder given to a file marked unlisted.

Scope: the whole document. page_files says which pages claim which of these files; a file no page claims is carried by the document itself.

A Whole Request That Creates a PDF

{
  "attachments": [
    {
      "name": "statement_4711",
      "file_name": "statement-4711.xml",
      "description": "The statement as a data file",
      "media_type": "text/xml",
      "relationship": "data",
      "modified": "2026-08-03T09:15:00+02:00"
    }
  ],
  "standard_fonts": [{ "name": "sans", "face": "helvetica" }],
  "items": [
    {
      "type": "text",
      "rect": { "llx": 72, "lly": 700, "urx": 523, "ury": 740 },
      "content": ["A page, and a data file carried beside it"],
      "font": "sans",
      "font_size": 12
    }
  ]
}

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 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 Files the Document Names without Carrying The Attachments Shown as a Portfolio Which Attachments a Page Claims Which Attachments a Font 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

See the Prices See the Examples