Created
March 2, 2016 11:38
-
-
Save kinsomicrote/0dc79a7608c4e454cd19 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require "prawn" | |
Prawn::Document.generate("greeting-card.pdf") do | |
stroke_color "008080" | |
stroke do | |
self.line_width = 10 | |
stroke_color "FF0000" #red | |
horizontal_line 0, 550, :at => 700 | |
end | |
stroke do | |
stroke_color "FFA500" #orange | |
horizontal_line 0, 550, :at => 680 | |
end | |
stroke do | |
stroke_color "00FF00" #green | |
horizontal_line 0, 550, :at => 660 | |
end | |
bounding_box([300, 600], :width => 200) do | |
text "Dear friends and family," | |
text "We've had a great year thanks to your love and support." | |
text "Wising you all the best in the coming year." | |
end | |
fill do | |
fill_color "FFA500" | |
polygon [100, 500], [20, 400], [180, 400] | |
end | |
fill do | |
fill_color "FFA500" | |
polygon [280,400], [200, 500], [360, 500] | |
end | |
fill do | |
fill_color "FFA500" | |
polygon [460, 500], [380, 400], [540, 400] | |
end | |
bounding_box([200, 300], :width => 300) do | |
font("Helvetica", :size => 30) do | |
text "Merry Christmas", | |
:color => "FFA500" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment