pub struct Cmap<'a> { /* private fields */ }
Expand description
Writer for a character map stream.
This struct is created by Chunk::cmap
.
Implementations§
source§impl<'a> Cmap<'a>
impl<'a> Cmap<'a>
sourcepub fn system_info(&mut self, info: SystemInfo<'_>) -> &mut Self
pub fn system_info(&mut self, info: SystemInfo<'_>) -> &mut Self
Write the /CIDSystemInfo
attribute. Required.
sourcepub fn writing_mode(&mut self, mode: WMode) -> &mut Self
pub fn writing_mode(&mut self, mode: WMode) -> &mut Self
Write the /WMode
attribute. Optional.
This describes whether the CMap applies to a font with horizontal or vertical writing mode. The default is whatever is specified in the CMap.
This is required in PDF/A and must match the writing mode of the embedded CMap.
sourcepub fn use_cmap_stream(&mut self, cmap: Ref) -> &mut Self
pub fn use_cmap_stream(&mut self, cmap: Ref) -> &mut Self
Write the /UseCMap
attribute using a stream reference. Optional.
This allows specifying a base CMap to extend.
Note that this attribute is restricted in PDF/A and may only be used
with the well-known CMap names from the PDF standard. Use
Self::use_cmap_predefined
to specify a predefined name.
sourcepub fn use_cmap_predefined(&mut self, name: Name<'_>) -> &mut Self
pub fn use_cmap_predefined(&mut self, name: Name<'_>) -> &mut Self
Write the /UseCMap
attribute using a predefined name. Optional.
This allows specifying a base CMap to extend.
Note that this attribute is restricted in PDF/A.
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.