PeachPDF

PeachPDF

PdfAttachment Class

A file to embed in the generated PDF, added through Attachments. The file shows up in a viewer’s attachments panel and is indexed in the document catalog’s /AF (Associated Files) array and /Names /EmbeddedFiles name tree.

public sealed class PdfAttachment

Inheritance System.Object → PdfAttachment

Remarks

Embedding arbitrary files is what separates PDF/A-3 from PDF/A-1 and PDF/A-2, so requesting an attachment together with a PdfAConformance level below PDF/A-3 is rejected at generation time. Without any PDF/A level attachments are simply ordinary PDF attachments.

Properties  
Data The file’s content. Required.
Description An optional human-readable description of the file.
FileName The file name shown to the reader (and used as the attachment’s key). Required, unique among the document’s attachments, and limited to characters a PDF name-tree key can carry (Latin-1); a non-ASCII name is additionally written as a Unicode string.
MimeType The file’s MIME type, for example text/xml or text/csv. Defaults to application/octet-stream.
ModificationDate The file’s last-modification date. When left null, the document’s resolved creation date is used (so output stays deterministic) and, when there is none, the current time.
Relationship How the file relates to the PDF’s content. Defaults to Unspecified.