-
-
Save xarimanx/1fe70df8f63c06b0f7ea18faed18ab98 to your computer and use it in GitHub Desktop.
Rotate and center text with Prawn as a watermark, e.g. for "[PAID]" on an invoice.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create_stamp("stamp") do | |
fill_color "cc0000" | |
text_box "[PAID]", | |
:size => 2.cm, | |
:width => bounds.width, | |
:height => bounds.height, | |
:align => :center, | |
:valign => :center, | |
:at => [0, bounds.height], | |
:rotate => 45, | |
:rotate_around => :center | |
end | |
stamp("stamp") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment