![]() |
|
sfTCPDFPlugin - 1.5.4sfTCPDFPlugin class provides abstraction for the TCPDF library. |
|
![]() |
111
users
Sign-in
to change your status |
It's a plugin to generate PDF documents, it can handle UT8 encoding. |
This plugin provides abstraction for the TCPDF library. The main interest of this FPDF "fork" resides in the fact that it can handle any UTF8 strings which is the native encoding format used by symfony.
| Name | Status | |
|---|---|---|
|
|
lead | rf]tod[oohay]ta[lioc_frq |
Plugin by Vernet Loïc aka COil. (qrf_coil[at]yahoo.fr)
Original library by Nicola Asuni (http://tcpdf.sourceforge.net)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Version | License | API | Released |
|---|---|---|---|
| 1.6.3stable | MIT license | 1.6.3stable | 24/09/2011 |
| 1.6.2stable | MIT license | 1.6.2stable | 09/04/2010 |
| Version | License | API | Released |
|---|---|---|---|
| 1.6.3stable | MIT license | 1.6.3stable | 24/09/2011 |
| 1.6.2stable | MIT license | 1.6.2stable | 09/04/2010 |
| Version | License | API | Released |
|---|---|---|---|
| 1.6.3stable | MIT license | 1.6.3stable | 24/09/2011 |
| 1.6.2stable | MIT license | 1.6.2stable | 09/04/2010 |
| 1.6.1stable | MIT license | 1.6.1stable | 16/04/2009 |
| 1.6.0stable | MIT license | 1.6.0stable | 11/04/2009 |
| Version | License | API | Released |
|---|---|---|---|
| 1.6.3stable | MIT license | 1.6.3stable | 24/09/2011 |
| 1.5.5stable | MIT license | 1.5.5stable | 21/01/2008 |
| 1.5.4stable | MIT license | 1.5.4stable | 04/06/2007 |
| Version | License | API | Released |
|---|---|---|---|
| 1.5.5stable | MIT license | 1.5.5stable | 21/01/2008 |
| 1.5.4stable | MIT license | 1.5.4stable | 04/06/2007 |
| 1.5.3stable | MIT license | 1.5.3stable | 18/03/2007 |
sfTCPDFPlugin class provides abstraction for the TCPDF library.
The main interest of this FPDF extension resides in the fact that it handles any UTF8 strings.
Install the plugin
symfony plugin-install http://plugins.symfony-project.com/sfTCPDFPlugin
or download it and unzip in your /plugins directory
Download the TCPDF library
Unzip it inside the /plugins/sfTCPDFplugin/lib folder
At this point, you should have a tcpdf folder in /plugins/sfTCPDFPlugin/lib
Copy the files in /web/sfTCPDFPlugin directly to your application /web directory
Clear you cache
symfony cc
Set sf_tcpdf_dir in your config.php application if TCPDF library is not inside the /plugins/sfTCPDFplugin/lib folder (check /plugins/sfTCPDFPlugin/config/config.php)
If you want to have custom settings for each generated PDF check /plugins/sfTCPDFPlugin/config/config.php and tcpdf/config/tcpdf_config.php).
If you want to run the tests, enable the sfTCPDF module in your settings.yml file, then call sfTCPDF/test or sfTCPDF/test2
1 - Hello World test (sfTCPDF/test)
/**
Hello world test */ public function executeTest() { // pdf object $pdf = new sfTCPDF();
// settings $pdf->SetFont("FreeSerif", "", 12); $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, *, PDF_FONT_SIZE_MAIN)); $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, *, PDF_FONT_SIZE_DATA)); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// init pdf doc $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->Cell(80, 10, "Hello World !!! & é € U û ã„ã‚Âã¯");
// output $pdf->Output(); return sfView::NONE; }
2 - Full test (sfTCPDF/test2, check /plugins/sfTCPDFPlugin/actions/actions.php)
COil :)
