pub struct EmbedRecord {
pub filename: String,
pub data: Vec<u8>,
pub unicode_filename: Option<String>,
pub description: Option<String>,
pub af_relationship: Option<String>,
pub mime_type: Option<String>,
}Expand description
One /EMBED entry — a single attached file. The writer emits one
/Filespec dict + one /EmbeddedFile stream per record and assembles
them into a /Names /EmbeddedFiles name tree.
Fields§
§filename: String/FS — file specification string (typically the original
filename). Required.
data: Vec<u8>/DataSource — raw file contents. Required. PostScript
strings can hold arbitrary bytes, so binary attachments
(PNGs, ZIPs, …) round-trip without re-encoding.
unicode_filename: Option<String>/UF — unicode filename. PDF spec recommends both /F and
/UF; when absent, the writer reuses filename.
description: Option<String>/Desc — human-readable description.
af_relationship: Option<String>/AFRelationship — relationship of this attachment to the
document content. Allow-list: Source, Data, Alternative,
Supplement, EncryptedPayload, Unspecified.
mime_type: Option<String>/MIMEType (PDF 1.7) — MIME type of the attached file.
Optional; viewers that respect it use it to pick the right
“open with” handler.
Trait Implementations§
Source§impl Clone for EmbedRecord
impl Clone for EmbedRecord
Source§fn clone(&self) -> EmbedRecord
fn clone(&self) -> EmbedRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more