what exactly is the problem here?
this works fine for me:
require 'prawn'
Prawn::Document.generate('hello.pdf') do |pdf|
pdf.text("Hello Prawn!")
pdf.image "image.jpg", :at => [pdf.bounds.right - 100, 0], :align => :right
pdf.number_pages "<page> in a total of <total>", :start_count_at => 0, :page_filter => :all, :at => [pdf.bounds.right - 100, 0], :align => :right, :size => 14
end
and for adding it to all pages you can do this:
require 'prawn'
Prawn::Document.generate('hello.pdf') do |pdf|
pdf.text("Hello Prawn!")
pdf.start_new_page
pdf.text("Hello Prawn!")
pdf.start_new_page
pdf.text("Hello Prawn!")
pdf.page_count.times do |i|
pdf.go_to_page i
pdf.image "image.jpg", :at => [pdf.bounds.right - 100, 0], :align => :right
end
pdf.number_pages "<page> in a total of <total>", :start_count_at => 0, :page_filter => :all, :at => [pdf.bounds.right - 100, 0], :align => :right, :size => 14
end
there might be better alternatives, but i never used prawn before.