manual/text/formatted_text.rb in prawn-1.0.0.rc2 vs manual/text/formatted_text.rb in prawn-1.0.0
- old
+ new
@@ -15,13 +15,13 @@
# is the text string and may provide the following options: <code>:styles</code>
# (an array of symbols), <code>:size</code> (the font size),
# <code>:character_spacing</code> (additional space between the characters),
# <code>:font</code> (the name of a registered font), <code>:color</code> (the
# same input accepted by <code>fill_color</code> and <code>stroke_color</code>),
-# <code>:link</code> (an URL to create a link), and <code>:anchor</code> (a
-# destination inside the document).
-#
+# <code>:link</code> (an URL to create a link), and <code>:local</code>
+# (a link to a local file).
+
require File.expand_path(File.join(File.dirname(__FILE__),
%w[.. example_helper]))
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
Prawn::Example.generate(filename) do
@@ -33,12 +33,12 @@
{ :text => "Different Font. ", :font => "Courier" },
{ :text => "Some coloring. ", :color => "FF00FF" },
{ :text => "Link to the wiki. ",
:color => "0000FF",
:link => "https://github.com/prawnpdf/prawn/wiki" },
- { :text => "Link to the Text Reference. " ,
+ { :text => "Link to a local file. ",
:color => "0000FF",
- :anchor => "Text Reference" }
+ :local => "./local_file.txt" }
]
formatted_text_box [ { :text => "Just your regular" },
{ :text => " text_box ", :font => "Courier" },
{ :text => "with some additional formatting options " +