.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ================== EXT: FPDF and FPDI ================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: David Brühlmeier :Changed: 2009-05-25T07:38:31.650000000 :Author: David Bruehlmeier :Email: typo3@bruehlmeier.com :Info 3: :Info 4: .. _EXT-FPDF-and-FPDI: EXT: FPDF and FPDI ================== Extension Key: **fpdf** Copyright 2006-2009, David Bruehlmeier, FPDF: copyright by Olivier Plathey FPDI: copyright by Setasign - Jan Slabon This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **EXT: FPDF and FPDI 1** **Introduction 1** What does it do? 1 **Users manual 1** **Configuration 2** **Known problems 2** **To-Do list 2** **Changelog 2** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ This extension is the FPDF library ( `www.fpdf.org `_ ) ported to TYPO3. **It is only useful for extension developers who want to build PDF-functionality. It cannot be used by itself.** The extension also includes the FPDI library ( `fpdi.setasign.de `_ ) which allows you to use PDF templates when creating your own PDF files. The current version of this extension is using the following libraries: - FPDF version 1.6 - FPDI version 1.3 - FPDF\_TPL version 1.1.3 Because of the latest FPDI-version, this extension requires PHP >= 4.2. .. _Users-manual: Users manual ------------ This section only explains how to use FPDF with TYPO3. For further references on the functionality of FPDF, please refer to the official FPDF-documentation ( `www.fpdf.org `_ ). First thing you need to do when you want to work with the FPDF library is to include it in the script where you want to use it: :: if (t3lib_extMgm::isLoaded('fpdf')) { require(t3lib_extMgm::extPath('fpdf').'class.tx_fpdf.php'); } Then you can start building your PDF document, just like documented in the FPDF-docs. For instance: :: // Get a new instance of the FPDF library $pdf = new PDF($orientation, $unit, $format); If you want to have a look at a working implementation, check out the extension “Partner” and look at the file inc/class.tx\_partner\_format.php, function formatAsPDF(). There you can also see how to use a PDF template. The only modification done to the original FPDF library is for adding own fonts. This can be achieved by adding the proper font-definition to the ext\_localconf.php file of your extension: :: // Add fonts to the fpdf library $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['fpdf']['fonts']['frutiger.z'] = array('Frutiger', '', t3lib_extMgm::extPath('myext').'font/', 'frutiger.php'); $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['fpdf']['fonts']['frutigerb.z'] = array('Frutiger', 'B', t3lib_extMgm::extPath('myext').'font/', 'frutigerb.php'); Please refer to the FPDF-documentation to see how to create the necessary font-definition files (frutiger.php and frutigerb.php in the example above). .. _Configuration: Configuration ------------- The only configuration possible is the inclusion of own font definitions (please refer the chapter “User manual”). .. _Known-problems: Known problems -------------- None yet. .. _To-Do-list: To-Do list ---------- Nothing planned .. _Changelog: Changelog --------- - 2009-05-25 - Updated to FPDF version 1.6 - Updated to FPDF\_TPL version 1.1.3 - Updated to FPDI version 1.3 - Migrated the code to include own fonts to the latest version of FPDF. - Included a new version of class.tx\_fpdf.php. Thanks a lot to Peter Klein for this contribution! - All require-statements now use TYPO3-relative paths. - 2007-06-22: Bugfix (wrong version of fpdf\_tpl.php was included) and added unit testcases - 2007-05-22: Updated to FPDI version 1.2 - 2005-04-08: First version (FPDF version 1.53 and FPDI version 1.01) |img-1| EXT: FPDF and FPDI - 2 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102