pub struct Resources<'a> { /* private fields */ }
Expand description
Writer for a resource dictionary.
This struct is created by Pages::resources
, Page::resources
,
FormXObject::resources
, and TilingPattern::resources
.
Implementations§
source§impl<'a> Resources<'a>
impl<'a> Resources<'a>
sourcepub fn color_spaces(&mut self) -> Dict<'_>
pub fn color_spaces(&mut self) -> Dict<'_>
sourcepub fn ext_g_states(&mut self) -> Dict<'_>
pub fn ext_g_states(&mut self) -> Dict<'_>
sourcepub fn proc_sets(
&mut self,
sets: impl IntoIterator<Item = ProcSet>,
) -> &mut Self
pub fn proc_sets( &mut self, sets: impl IntoIterator<Item = ProcSet>, ) -> &mut Self
Write the /ProcSet
attribute.
This defines what procedure sets are sent to an output device when printing the file as PostScript. The attribute is only used for PDFs with versions below 1.4.
sourcepub fn proc_sets_all(&mut self) -> &mut Self
pub fn proc_sets_all(&mut self) -> &mut Self
Write the /ProcSet
attribute with all available procedure sets.
The PDF 1.7 specification recommends that modern PDFs either omit the attribute or specify all available procedure sets, as this function does.
sourcepub fn properties(&mut self) -> TypedDict<'_, PropertyList<'_>>
pub fn properties(&mut self) -> TypedDict<'_, PropertyList<'_>>
Start writing the /Properties
attribute.
This allows to write property lists with indirect objects for
marked-content sequences. These properties can be used by property lists
using the MarkContent::properties_named
method. PDF 1.2+.
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.