To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / lib / plugins / rfpdf / README @ 1297:0a574315af3e
History | View | Annotate | Download (755 Bytes)
| 1 | 441:cbce1fd3b1b7 | Chris | FWIW - I am migrating my apps to Prawn and Prawnto |
|---|---|---|---|
| 2 | |||
| 3 | 0:513646585e45 | Chris | = RFPDF Template Plugin |
| 4 | |||
| 5 | A template plugin allowing the inclusion of ERB-enabled RFPDF template files. |
||
| 6 | |||
| 7 | 441:cbce1fd3b1b7 | Chris | == |
| 8 | == |
||
| 9 | == TCPDF Version (The New or UTF8 Version) |
||
| 10 | == |
||
| 11 | == |
||
| 12 | 0:513646585e45 | Chris | |
| 13 | 441:cbce1fd3b1b7 | Chris | TCPDF Documentation located at: |
| 14 | 0:513646585e45 | Chris | |
| 15 | 441:cbce1fd3b1b7 | Chris | http://phpdocs.moodle.org/com-tecnick-tcpdf/TCPDF.html |
| 16 | 0:513646585e45 | Chris | |
| 17 | 441:cbce1fd3b1b7 | Chris | Example of simple use in .rhtml: |
| 18 | 0:513646585e45 | Chris | |
| 19 | <% |
||
| 20 | 441:cbce1fd3b1b7 | Chris | @pdf = TCPDF.new() |
| 21 | @pdf.SetMargins(15, 27, 15); |
||
| 22 | @pdf.AddPage(); |
||
| 23 | text_options = {:font => "freeserif"}
|
||
| 24 | @pdf.draw_text(15, 10, "text", {:font_size => 12, :font => "freeserif"})
|
||
| 25 | %><%=@pdf.Output()%> |
||
| 26 | 0:513646585e45 | Chris | |
| 27 | 441:cbce1fd3b1b7 | Chris | See the following files for sample of useage: |
| 28 | 0:513646585e45 | Chris | |
| 29 | 441:cbce1fd3b1b7 | Chris | test_unicode.rfpdf |
| 30 | utf8test.txt |
||
| 31 | logo_example.png |
||
| 32 | 0:513646585e45 | Chris | |
| 33 | 441:cbce1fd3b1b7 | Chris | FPDF users can migrate to TCPDF by changing the following from: |
| 34 | 0:513646585e45 | Chris | |
| 35 | 441:cbce1fd3b1b7 | Chris | pdf = FPDF.new |
| 36 | 0:513646585e45 | Chris | |
| 37 | 441:cbce1fd3b1b7 | Chris | to: |
| 38 | 0:513646585e45 | Chris | |
| 39 | 441:cbce1fd3b1b7 | Chris | pdf = TCPDF.new |
| 40 | 0:513646585e45 | Chris | |
| 41 | 1294:3e4c3460b6ca | Chris | ENJOY! |