new (PDF::Writer::Object::Page)

        # File lib/pdf/writer/object/page.rb, line 16
    16:   def initialize(parent, relative = nil)
    17:     super(parent)
    18:
    19:     @parent.current_page = self
    20:     @owner = @parent.instance_variable_get('@current_node')
    21:     @page_number = @parent.pages.size
    22:     @contents = []
    23:
    24:     if relative.nil?
    25:       @parent.pages << self
    26:     else
    27:       relative[:page] = self
    28:       @parent.pages.add(relative)
    29:     end
    30:
    31:       # make a contents object to go with this page
    32:     @contents << PDF::Writer::Object::Contents.new(@parent, self)
    33:     @parent.instance_variable_set('@current_contents', @contents[-1])
    34:     match = (@parent.pages.size % 2 == 0 ? :even_pages : :odd_pages)
    35:       # Cheat here. I don't want to add an unnecessary attribute.
    36:     @parent.instance_variable_get('@add_loose_objects').each do |obj, target|
    37:       @contents << obj if target == :all_pages or match == target
    38:     end
    39:
    40:     @annotations = []
    41:
    42:     @media_box  = nil
    43:     @crop_box   = nil
    44:     @bleed_box  = nil
    45:     @trim_box   = nil
    46:     @art_box    = nil
    47:   end