Class: Pdfrb::Model::Type::OptContentUsageApplication
Overview
Optional Content Usage Application dict (s8.11.4.1). Decides
which OCGs to enable when the user views/prints/exports the
document.
Instance Attribute Summary
Attributes inherited from Object
#document, #gen, #oid, #value
Instance Method Summary
collapse
#[], #[]=, 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
Instance Method Details
12
|
# File 'lib/pdfrb/model/type/opt_content_ext.rb', line 12
def category; self[:Category]; end
|
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/pdfrb/model/type/opt_content_ext.rb', line 18
def each_ocg
return enum_for(:each_ocg) unless block_given?
return unless ocgs && document
arr = ocgs.is_a?(Pdfrb::Model::PdfArray) ? ocgs.to_a : ocgs
arr.each do |ref|
obj = ref.is_a?(Pdfrb::Model::Reference) ? document.object(ref) : ref
yield obj if obj
end
end
|
10
|
# File 'lib/pdfrb/model/type/opt_content_ext.rb', line 10
def event; self[:Event]&.to_sym; end
|
#export_event? ⇒ Boolean
16
|
# File 'lib/pdfrb/model/type/opt_content_ext.rb', line 16
def export_event?; event == :Export; end
|
11
|
# File 'lib/pdfrb/model/type/opt_content_ext.rb', line 11
def ocgs; self[:OCGs]; end
|
#print_event? ⇒ Boolean
15
|
# File 'lib/pdfrb/model/type/opt_content_ext.rb', line 15
def print_event?; event == :Print; end
|
#view_event? ⇒ Boolean
14
|
# File 'lib/pdfrb/model/type/opt_content_ext.rb', line 14
def view_event?; event == :View; end
|