Expand description
PDF embedded files (file attachments).
PDFs can carry arbitrary file attachments via the catalog’s
/Names /EmbeddedFiles name tree (PDF 1.4+) or as the /FS
target of a /FileAttachment annotation. This module exposes the
document-level table; the per-annotation form is reachable via
Annotation’s FileAttachmentAnnotation.
Each entry is a file specification describing the attachment
(name, description, relationship hint, MIME type, modification
dates, byte size) plus a reference to the embedded-file stream.
The bytes themselves load on demand via
PdfDocument::embedded_file_bytes.
Structs§
- Embedded
File - One embedded file.
Enums§
- AfRelationship
/AFRelationship— relationship of an associated file to the host document, from PDF 2.0 §14.13.
Functions§
- decode_
embedded_ file_ stream - Decode the bytes of an embedded-file stream by
(obj_num, gen_num). - parse_
embedded_ files - Walk the catalog’s
/Names /EmbeddedFilesname tree and produce a map of every attachment, keyed by the tree’s name.