# File lib/prawn/document.rb, line 545
    def  number_pagesnumber_pages(string, position)
      page_count.times do |i|
        go_to_page(i+1)
        str = string.gsub("<page>","#{i+1}").gsub("<total>","#{page_count}")
        draw_text str, :at => position
      end
    end