annotate .svn/pristine/4d/4d81cc5316e201f2bbb721032960a2f74380fe9b.svn-base @ 1519:afce8026aaeb redmine-2.4-integration

Merge from branch "live"
author Chris Cannam
date Tue, 09 Sep 2014 09:34:53 +0100
parents cbb26bc654de
children
rev   line source
Chris@909 1 FWIW - I am migrating my apps to Prawn and Prawnto
Chris@909 2
Chris@909 3 = RFPDF Template Plugin
Chris@909 4
Chris@909 5 A template plugin allowing the inclusion of ERB-enabled RFPDF template files.
Chris@909 6
Chris@909 7 ==
Chris@909 8 ==
Chris@909 9 == TCPDF Version (The New or UTF8 Version)
Chris@909 10 ==
Chris@909 11 ==
Chris@909 12
Chris@909 13 If you are using HTML, it is recommended you install:
Chris@909 14
Chris@909 15 gem install -r htmlentities
Chris@909 16
Chris@909 17 TCPDF Documentation located at:
Chris@909 18
Chris@909 19 http://phpdocs.moodle.org/com-tecnick-tcpdf/TCPDF.html
Chris@909 20
Chris@909 21 Example of simple use in .rhtml:
Chris@909 22
Chris@909 23 <%
Chris@909 24 @pdf = TCPDF.new()
Chris@909 25 @pdf.SetMargins(15, 27, 15);
Chris@909 26 @pdf.AddPage();
Chris@909 27 text_options = {:font => "freeserif"}
Chris@909 28 @pdf.draw_text(15, 10, "text", {:font_size => 12, :font => "freeserif"})
Chris@909 29 %><%=@pdf.Output()%>
Chris@909 30
Chris@909 31 See the following files for sample of useage:
Chris@909 32
Chris@909 33 test_unicode.rfpdf
Chris@909 34 utf8test.txt
Chris@909 35 logo_example.png
Chris@909 36
Chris@909 37 FPDF users can migrate to TCPDF by changing the following from:
Chris@909 38
Chris@909 39 pdf = FPDF.new
Chris@909 40
Chris@909 41 to:
Chris@909 42
Chris@909 43 pdf = TCPDF.new
Chris@909 44
Chris@909 45 ENJOY!