Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Brett Neumeier
committed
Oct 22, 2009
1 parent
2024b97
commit 45331b4
Showing
30 changed files
with
414 additions
and
414 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) | ||
require "rubygems" | ||
require "prawn" | ||
require "prawn" | ||
require "prawn/layout" | ||
|
||
Prawn.debug = true |
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
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
32 changes: 16 additions & 16 deletions
32
examples/page_layout/flowing_text_with_header_and_footer.rb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
# encoding: utf-8 | ||
# | ||
# encoding: utf-8 | ||
# | ||
# Multi-faceted example that demonstrates a document flowing between header | ||
# and footer regions. At the moment, headers and footers in Prawn are run | ||
# using the current font settings (among other things), for each page. This | ||
# means that it is important to non-destructively set your desired styling | ||
# within your headers and footers, as shown below. | ||
# means that it is important to non-destructively set your desired styling | ||
# within your headers and footers, as shown below. | ||
# | ||
# Future versions of Prawn may make this more convenient somehow. | ||
# | ||
require "#{File.dirname(__FILE__)}/../example_helper.rb" | ||
|
||
Prawn::Document.generate("flow_with_headers_and_footers.pdf") do | ||
|
||
header margin_box.top_left do | ||
header margin_box.top_left do | ||
font "Helvetica" do | ||
text "Here's My Fancy Header", :size => 25, :align => :center | ||
text "Here's My Fancy Header", :size => 25, :align => :center | ||
stroke_horizontal_rule | ||
end | ||
end | ||
end | ||
|
||
footer [margin_box.left, margin_box.bottom + 25] do | ||
font "Helvetica" do | ||
stroke_horizontal_rule | ||
text "And here's a sexy footer", :size => 16 | ||
end | ||
end | ||
bounding_box([bounds.left, bounds.top - 50], | ||
:width => bounds.width, :height => bounds.height - 100) do | ||
text "this is some flowing text " * 200 | ||
end | ||
|
||
bounding_box([bounds.left, bounds.top - 50], | ||
:width => bounds.width, :height => bounds.height - 100) do | ||
text "this is some flowing text " * 200 | ||
|
||
|
||
end | ||
|
||
end |
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
Oops, something went wrong.