-
-
Save sahidursuman/e2595fc8c583ccb1495630f212d2343b to your computer and use it in GitHub Desktop.
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
pdf = Prawn::Document.new(:page_size => [ 459, 595 ]) | |
pdf.font_families.update( | |
"Gill" => { :bold => "#{Prawn::BASEDIR}/data/fonts/GillSansBold.ttf", | |
:italic => "#{Prawn::BASEDIR}/data/fonts/GillSansItalic.ttf", | |
:bold_italic => "#{Prawn::BASEDIR}/data/fonts/GillSansBoldItalic.ttf", | |
:light => "#{Prawn::BASEDIR}/data/fonts/GillSansLight.ttf", | |
:light_italic => "#{Prawn::BASEDIR}/data/fonts/GillSansLightItalic.ttf", | |
:normal => "#{Prawn::BASEDIR}/data/fonts/GillSans.ttf" } ) | |
# Name/Location | |
# Text Box | |
pdf.bounding_box [9, 490], :width => 378 do | |
# Character | |
pdf.font("Gill", :style => :bold_italic) | |
pdf.font_size(30) | |
# Name | |
pdf.text "Gallery Name", :align => :left | |
# Character | |
pdf.font("Gill", :style => :light) | |
pdf.font_size(12) | |
# Location | |
# Street_address_line_one | |
pdf.pad_top(30) do | |
pdf.text "123 Address 1", :align => :left | |
end | |
# Street_address_line_two | |
pdf.text "123 Address 2", :align => :left | |
# City | |
pdf.text "City", :align => :left | |
# State | |
pdf.text "State", :align => :left | |
# Zip | |
pdf.text "Zip Code 1" + "Zip Code 2", :align => :left | |
# Country | |
pdf.text "Country", :align => :left | |
# Phone | |
pdf.text "555.555.555", :align => :left | |
# Fax | |
pdf.text "555.555.555", :align => :left | |
pdf.text "[email protected]", :align => :left | |
# Homepage | |
pdf.text "http://someurl.com", :align => :left | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment