Skip to content

Instantly share code, notes, and snippets.

@twinge
Created March 19, 2010 16:18
Show Gist options
  • Save twinge/337746 to your computer and use it in GitHub Desktop.
Save twinge/337746 to your computer and use it in GitHub Desktop.
pdf = Prawn::Document.new(:template => @format.zip.path)
inspector = PDF::Inspector::Page.analyze(pdf.render)
pdf.font 'Helvetica'
pdf.font_size = 8
1.upto(inspector.pages.size) do |page|
pdf.go_to_page(page)
pdf.transparent(0.2) do
pdf.fill_color "ff0000"
pdf.draw_text "watermark", :at => [200,420], :size => 32, :rotate => 45
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment