Class: Pdfrb::Model::Type::WebCaptureInfo
- Inherits:
-
Cos::Dictionary
- Object
- Object
- Cos::Dictionary
- Pdfrb::Model::Type::WebCaptureInfo
- Defined in:
- lib/pdfrb/model/type/web_capture_page_set.rb
Overview
WebCaptureInfo (ISO 32000-1 §14.10.2, PDF 1.3, deprecated PDF 2.0). Root dictionary for the Web Capture system, listed in the Catalog's /SpiderInfo key.
Instance Attribute Summary
Attributes inherited from Object
Instance Method Summary collapse
-
#commands(document = nil) ⇒ Object
/C — optional array of WebCaptureCommands.
-
#version ⇒ Object
/V — required version number (fixed 1).
Methods inherited from Cos::Dictionary
#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate
Methods inherited from Object
#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type
Constructor Details
This class inherits a constructor from Pdfrb::Model::Cos::Dictionary
Instance Method Details
#commands(document = nil) ⇒ Object
/C — optional array of WebCaptureCommands.
60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/pdfrb/model/type/web_capture_page_set.rb', line 60 def commands(document = nil) refs = value[:C] return [] unless refs && document arr = refs.is_a?(Pdfrb::Model::PdfArray) ? refs.value : refs arr = [arr] unless arr.is_a?(::Array) arr.filter_map do |r| resolved = r.is_a?(Pdfrb::Model::Reference) ? document.object(r) : r next nil unless resolved && resolved.value.is_a?(::Hash) Pdfrb::Model::Type::WebCaptureCommand.new(resolved.value) end end |
#version ⇒ Object
/V — required version number (fixed 1).
55 56 57 |
# File 'lib/pdfrb/model/type/web_capture_page_set.rb', line 55 def version value[:V] end |