Class: Pdfrb::Model::Type::WebCapturePageSet
- Inherits:
-
Cos::Stream
- Object
- Object
- Cos::Dictionary
- Cos::Stream
- Pdfrb::Model::Type::WebCapturePageSet
- Defined in:
- lib/pdfrb/model/type/web_capture_page_set.rb
Overview
WebCapturePageSet (ISO 32000-1 §14.10.3, PDF 1.3, deprecated PDF 2.0). A spider content set holding captured pages. The /O array lists page objects converted from HTML.
Instance Attribute Summary
Attributes inherited from Cos::Stream
Attributes inherited from Object
Instance Method Summary collapse
-
#content_type ⇒ Object
/CT — optional content type.
-
#pages(document = nil) ⇒ Object
/O — required array of indirect references to pages.
-
#set_id ⇒ Object
/ID — required unique identifier.
-
#set_type ⇒ Object
/S — required, fixed "SPS" (Spider Page Set).
-
#timestamp ⇒ Object
/TS — optional date of capture.
-
#type ⇒ Object
/Type — optional, fixed "SpiderContentSet".
Methods inherited from Cos::Stream
#decoded_stream, #encoded_stream=, #initialize
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::Stream
Instance Method Details
#content_type ⇒ Object
/CT — optional content type.
38 39 40 |
# File 'lib/pdfrb/model/type/web_capture_page_set.rb', line 38 def content_type value[:CT] end |
#pages(document = nil) ⇒ Object
/O — required array of indirect references to pages.
28 29 30 31 32 33 34 35 |
# File 'lib/pdfrb/model/type/web_capture_page_set.rb', line 28 def pages(document = nil) refs = value[:O] return [] unless refs && document arr = refs.is_a?(Pdfrb::Model::PdfArray) ? refs.value : refs arr = [arr] unless arr.is_a?(::Array) arr.filter_map { |r| r.is_a?(Pdfrb::Model::Reference) ? document.object(r) : r } end |
#set_id ⇒ Object
/ID — required unique identifier.
23 24 25 |
# File 'lib/pdfrb/model/type/web_capture_page_set.rb', line 23 def set_id value[:ID] end |
#set_type ⇒ Object
/S — required, fixed "SPS" (Spider Page Set).
18 19 20 |
# File 'lib/pdfrb/model/type/web_capture_page_set.rb', line 18 def set_type value[:S]&.to_sym end |
#timestamp ⇒ Object
/TS — optional date of capture.
43 44 45 |
# File 'lib/pdfrb/model/type/web_capture_page_set.rb', line 43 def value[:TS] end |
#type ⇒ Object
/Type — optional, fixed "SpiderContentSet".
13 14 15 |
# File 'lib/pdfrb/model/type/web_capture_page_set.rb', line 13 def type value[:Type]&.to_sym end |