pub struct Form<'a> { /* private fields */ }
Expand description
Writer for an interactive forms dictionary. PDF 1.2+.
This struct is created by Catalog::form
.
Implementations§
source§impl<'a> Form<'a>
impl<'a> Form<'a>
sourcepub fn fields(&mut self, fields: impl IntoIterator<Item = Ref>) -> &mut Self
pub fn fields(&mut self, fields: impl IntoIterator<Item = Ref>) -> &mut Self
Write the /Fields
attribute to reference the root form fields
(those who have no immediate parent) of this document.
sourcepub fn sig_flags(&mut self, flags: SigFlags) -> &mut Self
pub fn sig_flags(&mut self, flags: SigFlags) -> &mut Self
Write the /SigFlags
attribute to set various document-level
characteristics related to signature fields.
sourcepub fn calculation_order(
&mut self,
actions: impl IntoIterator<Item = Ref>,
) -> &mut Self
pub fn calculation_order( &mut self, actions: impl IntoIterator<Item = Ref>, ) -> &mut Self
Write the /CO
attribute to set the field dictionaries with calculation
actions, defining the calculation order in which their values will be
recalculated when the value of any field changes.
sourcepub fn default_resources(&mut self) -> Resources<'_>
pub fn default_resources(&mut self) -> Resources<'_>
Start writing the /DR
attribute to set the default resources
that shall be used by form field appearance streams. At a minimum, this
dictionary shall contain a font entry specifying the resource name and
font dictionary of the default font for displaying text.
sourcepub fn default_appearance(&mut self, default: Str<'_>) -> &mut Self
pub fn default_appearance(&mut self, default: Str<'_>) -> &mut Self
Write the document-wide default value for the /DA
attribute of
fields containing variable text. See
Field::vartext_default_appearance
.
sourcepub fn quadding(&mut self, default: Quadding) -> &mut Self
pub fn quadding(&mut self, default: Quadding) -> &mut Self
Write the document-wide default value for the /Q
attribute of
fields containing variable text. See Field::vartext_quadding
.
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.