walk_pages (PDF::Reader::Content)

    # File lib/pdf/reader/content.rb, line 287
        def walk_pages (page)

          # extract page content
          if page[:Type] == :Pages
            callback(:begin_page_container, [page])
            res = @xref.object(page[:Resources])
            resources.push res if res
            @xref.object(page[:Kids]).each {|child| walk_pages(@xref.object(child))}
            resources.pop if res
            callback(:end_page_container)
          elsif page[:Type] == :Page
            callback(:begin_page, [page])
            res = @xref.object(page[:Resources])
            resources.push res if res
            walk_resources(current_resources)

            if @xref.object(page[:Contents]).kind_of?(Array)
              contents = @xref.object(page[:Contents])
            else
              contents = [page[:Contents]]
            end

            contents.each do |content|
              obj = @xref.object(content)
              content_stream(obj)
            end if page.has_key?(:Contents) and page[:Contents]

            resources.pop if res
            callback(:end_page)
          end
        end