def insert_page(index, page = Page.new)
            init_page_tree

            # Page from another document must be exported.
            page = page.export if page.document and page.document != self

            self.Catalog.Pages.insert_page(index, page)

            yield(page) if block_given?

            self
        end
def insert_page(index, page = Page.new)
            init_page_tree

            # Page from another document must be exported.
            page = page.export if page.document and page.document != self

            self.Catalog.Pages.insert_page(index, page)

            yield(page) if block_given?

            self
        end
Inserts a page at position _index_ into the document.
 _index_:: Page index (starting from one).
 _page_:: The page to insert into the document. Creates a new one if none given.

 Pass the Page object if a block is present.