pub struct EmbeddedFile<'a> { /* private fields */ }
Expand description
Writer for an embedded file stream.
This struct is created by Chunk::embedded_file
.
Implementations§
source§impl<'a> EmbeddedFile<'a>
impl<'a> EmbeddedFile<'a>
sourcepub fn subtype(&mut self, subtype: Name<'_>) -> &mut Self
pub fn subtype(&mut self, subtype: Name<'_>) -> &mut Self
Write the /Subtype
attribute to set the file type.
This can either be a MIME type or a name prefixed by a first class PDF
prefix. Note that special characters must be encoded as described in
section 7.3.5 of the PDF 1.7 specification, e.g. image/svg+xml
would
become Name(b"image#2Fsvg+xml")
.
sourcepub fn params(&mut self) -> EmbeddingParams<'_>
pub fn params(&mut self) -> EmbeddingParams<'_>
Start writing the /Params
dictionary.
Methods from Deref<Target = Stream<'a>>§
sourcepub fn decode_parms(&mut self) -> DecodeParms<'_>
pub fn decode_parms(&mut self) -> DecodeParms<'_>
Start writing the /DecodeParms
attribute.
This is a dictionary that specifies parameters to be used in decoding
the stream data using the filter specified by the
/Filter
attribute.
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.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.