Class: HexaPDF::Type::AcroForm::SignatureField
- Inherits:
-
Field
- Object
- Object
- Dictionary
- Field
- HexaPDF::Type::AcroForm::SignatureField
- Defined in:
- lib/hexapdf/type/acro_form/signature_field.rb
Overview
AcroForm signature fields represent a digital signature.
It serves two purposes: To visually display the signature and to hold the information of the digital signature itself.
If the signature should not be visible, the associated widget annotation should have zero width and height; and/or the ‘hidden’ or ‘no_view’ flags of the annotation should be set.
See: PDF2.0 s12.7.5.5
Defined Under Namespace
Classes: CertificateSeedValueDictionary, LockDictionary, SeedValueDictionary
Constant Summary
Constants inherited from Field
Constants included from DictionaryFields
DictionaryFields::Boolean, DictionaryFields::PDFByteString, DictionaryFields::PDFDate
Instance Attribute Summary
Attributes inherited from Object
#data, #document, #must_be_indirect
Instance Method Summary collapse
-
#field_value ⇒ Object
Returns the associated signature dictionary or
nil
if the signature is not filled in. -
#field_value=(sig_dict) ⇒ Object
Sets the signature dictionary as value of this signature field.
Methods inherited from Field
#[], #alternate_field_name, #alternate_field_name=, #concrete_field_type, #create_widget, #delete_widget, #each_widget, #embedded_widget?, #field_name, #field_type, #flags, #form_field, #full_field_name, inherited_value, #must_be_indirect?, #terminal_field?, wrap
Methods included from Utils::BitField
Methods inherited from Dictionary
#[], #[]=, define_field, define_type, #delete, #each, each_field, #empty?, field, #key?, #to_hash, type, #type
Methods inherited from Object
#<=>, #==, #cache, #cached?, #clear_cache, deep_copy, #deep_copy, #document?, #eql?, field, #gen, #gen=, #hash, #indirect?, #initialize, #inspect, make_direct, #must_be_indirect?, #null?, #oid, #oid=, #type, #validate, #value, #value=
Constructor Details
This class inherits a constructor from HexaPDF::Object
Instance Method Details
#field_value ⇒ Object
Returns the associated signature dictionary or nil
if the signature is not filled in.
211 212 213 214 |
# File 'lib/hexapdf/type/acro_form/signature_field.rb', line 211 def field_value val = self[:V] val.instance_of?(Dictionary) ? document.wrap(val, type: :Sig) : val end |
#field_value=(sig_dict) ⇒ Object
Sets the signature dictionary as value of this signature field.
217 218 219 |
# File 'lib/hexapdf/type/acro_form/signature_field.rb', line 217 def field_value=(sig_dict) self[:V] = sig_dict end |