Struct pdf_writer::writers::FileSpec
source · pub struct FileSpec<'a> { /* private fields */ }
Expand description
Writer for a file specification dictionary.
This struct is created by Annotation::file_spec
,
Reference::file_spec
, and Action::file_spec
.
Implementations§
source§impl<'a> FileSpec<'a>
impl<'a> FileSpec<'a>
sourcepub fn file_system(&mut self, system: Name<'_>) -> &mut Self
pub fn file_system(&mut self, system: Name<'_>) -> &mut Self
Write the /FS
attribute to set the file system this entry relates to.
If you set the system
argument to Name(b"URL")
, this becomes an URL
specification.
sourcepub fn path(&mut self, path: Str<'_>) -> &mut Self
pub fn path(&mut self, path: Str<'_>) -> &mut Self
Write the /F
attribute to set the file path. Directories are indicated
by /
, independent of the platform.
sourcepub fn unic_file(&mut self, path: TextStr<'_>) -> &mut Self
pub fn unic_file(&mut self, path: TextStr<'_>) -> &mut Self
Write the /UF
attribute to set a Unicode-compatible path. Directories
are indicated by /
, independent of the platform. PDF 1.7+.
sourcepub fn volatile(&mut self, dont_cache: bool) -> &mut Self
pub fn volatile(&mut self, dont_cache: bool) -> &mut Self
Write the /V
attribute to indicate whether not to cache the file.
sourcepub fn description(&mut self, desc: TextStr<'_>) -> &mut Self
pub fn description(&mut self, desc: TextStr<'_>) -> &mut Self
Write the /Desc
attribute to set a file description. PDF 1.6+.
sourcepub fn embedded_file(&mut self, id: Ref) -> &mut Self
pub fn embedded_file(&mut self, id: Ref) -> &mut Self
Write the /EF
attribute to reference an embedded file.
PDF 1.3+.
This only sets an embedded file for the F
attribute corresponding to
the path
method. You will need to write this dictionary
manually if you need to set UF
.
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.