##// END OF EJS Templates
Merged r11399 from trunk to 2.2-stable (#13138)...
Toshi MARUYAMA -
r11170:252df8dfc0a4
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -1,45 +1,41
1 FWIW - I am migrating my apps to Prawn and Prawnto
1 FWIW - I am migrating my apps to Prawn and Prawnto
2
2
3 = RFPDF Template Plugin
3 = RFPDF Template Plugin
4
4
5 A template plugin allowing the inclusion of ERB-enabled RFPDF template files.
5 A template plugin allowing the inclusion of ERB-enabled RFPDF template files.
6
6
7 ==
7 ==
8 ==
8 ==
9 == TCPDF Version (The New or UTF8 Version)
9 == TCPDF Version (The New or UTF8 Version)
10 ==
10 ==
11 ==
11 ==
12
12
13 If you are using HTML, it is recommended you install:
14
15 gem install -r htmlentities
16
17 TCPDF Documentation located at:
13 TCPDF Documentation located at:
18
14
19 http://phpdocs.moodle.org/com-tecnick-tcpdf/TCPDF.html
15 http://phpdocs.moodle.org/com-tecnick-tcpdf/TCPDF.html
20
16
21 Example of simple use in .rhtml:
17 Example of simple use in .rhtml:
22
18
23 <%
19 <%
24 @pdf = TCPDF.new()
20 @pdf = TCPDF.new()
25 @pdf.SetMargins(15, 27, 15);
21 @pdf.SetMargins(15, 27, 15);
26 @pdf.AddPage();
22 @pdf.AddPage();
27 text_options = {:font => "freeserif"}
23 text_options = {:font => "freeserif"}
28 @pdf.draw_text(15, 10, "text", {:font_size => 12, :font => "freeserif"})
24 @pdf.draw_text(15, 10, "text", {:font_size => 12, :font => "freeserif"})
29 %><%=@pdf.Output()%>
25 %><%=@pdf.Output()%>
30
26
31 See the following files for sample of useage:
27 See the following files for sample of useage:
32
28
33 test_unicode.rfpdf
29 test_unicode.rfpdf
34 utf8test.txt
30 utf8test.txt
35 logo_example.png
31 logo_example.png
36
32
37 FPDF users can migrate to TCPDF by changing the following from:
33 FPDF users can migrate to TCPDF by changing the following from:
38
34
39 pdf = FPDF.new
35 pdf = FPDF.new
40
36
41 to:
37 to:
42
38
43 pdf = TCPDF.new
39 pdf = TCPDF.new
44
40
45 ENJOY! No newline at end of file
41 ENJOY!
@@ -1,11 +1,6
1 begin
2 require('htmlentities')
3 rescue LoadError
4 # This gem is not required - just nice to have.
5 end
6 require('cgi')
1 require('cgi')
7 require 'rfpdf'
2 require 'rfpdf'
8
3
9 # Mime::Type.register "application/pdf", :pdf
4 # Mime::Type.register "application/pdf", :pdf
10 # ActionView::Template::register_template_handler 'rfpdf', RFPDF::TemplateHandlers::Base
5 # ActionView::Template::register_template_handler 'rfpdf', RFPDF::TemplateHandlers::Base
11
6
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now