Class Origami::Page
In: sources/parser/page.rb
Parent: Dictionary

Class representing a Page in the PDF document.

Methods

add_annot   new   onClose   onOpen   pre_build  

Included Modules

Configurable

Constants

Resources = Resources.new.pre_build
P = self if is_indirect?
O = action
C = action

Public Class methods

Creates a new document Page.

hash:A hash of attributes to set to this Page.

[Source]

     # File sources/parser/page.rb, line 191
191:     def initialize(hash = {}, indirect = true)
192:      
193:       super(hash, indirect)
194:       
195:     end

Public Instance methods

Add an Annotation to the Page.

[Source]

     # File sources/parser/page.rb, line 208
208:     def add_annot(annotation)
209:       
210:       unless annotation.is_a?(Annotation::Annotation)
211:         raise TypeError, "An Annotation object must be passed."
212:       end
213:       
214:       self.Annots ||= Array.new
215:       self.Annots << annotation
216:       
217:       annotation.P = self if is_indirect?
218:       
219:     end

[Source]

     # File sources/parser/page.rb, line 233
233:     def onClose(action)
234:       
235:       unless action.is_a?(Action::Action)
236:         raise TypeError, "An Action object must be passed."
237:       end
238:       
239:       self.AA ||= PageAdditionalActions.new
240:       self.AA.C = action
241:       
242:     end

[Source]

     # File sources/parser/page.rb, line 221
221:     def onOpen(action)
222:       
223:       unless action.is_a?(Action::Action)
224:         raise TypeError, "An Action object must be passed."
225:       end
226:       
227:       self.AA ||= PageAdditionalActions.new
228:       self.AA.O = action
229:       
230:       self
231:     end

[Source]

     # File sources/parser/page.rb, line 197
197:     def pre_build
198:       unless self.Resources
199:         self.Resources = Resources.new.pre_build
200:       end
201: 
202:       super
203:     end

[Validate]