The requested changes are too big and content was truncated. Show full diff
@@ -1,45 +1,41 | |||
|
1 | 1 | FWIW - I am migrating my apps to Prawn and Prawnto |
|
2 | 2 | |
|
3 | 3 | = RFPDF Template Plugin |
|
4 | 4 | |
|
5 | 5 | A template plugin allowing the inclusion of ERB-enabled RFPDF template files. |
|
6 | 6 | |
|
7 | 7 | == |
|
8 | 8 | == |
|
9 | 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 | 13 | TCPDF Documentation located at: |
|
18 | 14 | |
|
19 | 15 | http://phpdocs.moodle.org/com-tecnick-tcpdf/TCPDF.html |
|
20 | 16 | |
|
21 | 17 | Example of simple use in .rhtml: |
|
22 | 18 | |
|
23 | 19 | <% |
|
24 | 20 | @pdf = TCPDF.new() |
|
25 | 21 | @pdf.SetMargins(15, 27, 15); |
|
26 | 22 | @pdf.AddPage(); |
|
27 | 23 | text_options = {:font => "freeserif"} |
|
28 | 24 | @pdf.draw_text(15, 10, "text", {:font_size => 12, :font => "freeserif"}) |
|
29 | 25 | %><%=@pdf.Output()%> |
|
30 | 26 | |
|
31 | 27 | See the following files for sample of useage: |
|
32 | 28 | |
|
33 | 29 | test_unicode.rfpdf |
|
34 | 30 | utf8test.txt |
|
35 | 31 | logo_example.png |
|
36 | 32 | |
|
37 | 33 | FPDF users can migrate to TCPDF by changing the following from: |
|
38 | 34 | |
|
39 | 35 | pdf = FPDF.new |
|
40 | 36 | |
|
41 | 37 | to: |
|
42 | 38 | |
|
43 | 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 | 1 |
|
|
7 | 2 | require 'rfpdf' |
|
8 | 3 | |
|
9 | 4 | # Mime::Type.register "application/pdf", :pdf |
|
10 | 5 | # ActionView::Template::register_template_handler 'rfpdf', RFPDF::TemplateHandlers::Base |
|
11 | 6 |
|
1 | 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