[2] | 1 | <?php |
---|
| 2 | /***************************************************************************\ |
---|
| 3 | * EGroupWare - pdf creation class * |
---|
| 4 | * http://www.linux-at-work.de * |
---|
| 5 | * http://www.phpgw.de * |
---|
| 6 | * http://www.egroupware.org * |
---|
| 7 | * Written by : Lars Kneschke [lkneschke@linux-at-work.de] * |
---|
| 8 | * ------------------------------------------------- * |
---|
| 9 | * Copyright (c) 2004, Lars Kneschke * |
---|
| 10 | * All rights reserved. * |
---|
| 11 | * * |
---|
| 12 | * Redistribution and use in source and binary forms, with or without * |
---|
| 13 | * modification, are permitted provided that the following conditions are * |
---|
| 14 | * met: * |
---|
| 15 | * * |
---|
| 16 | * * Redistributions of source code must retain the above copyright * |
---|
| 17 | * notice, this list of conditions and the following disclaimer. * |
---|
| 18 | * * Redistributions in binary form must reproduce the above copyright * |
---|
| 19 | * notice, this list of conditions and the following disclaimer in the * |
---|
| 20 | * documentation and/or other materials provided with the distribution.* |
---|
| 21 | * * Neither the name of the FeLaMiMail organization nor the names of * |
---|
| 22 | * its contributors may be used to endorse or promote products derived * |
---|
| 23 | * from this software without specific prior written permission. * |
---|
| 24 | * * |
---|
| 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * |
---|
| 26 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * |
---|
| 27 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR* |
---|
| 28 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * |
---|
| 29 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * |
---|
| 30 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * |
---|
| 31 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * |
---|
| 32 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * |
---|
| 33 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * |
---|
| 34 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * |
---|
| 35 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * |
---|
| 36 | \***************************************************************************/ |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | define('FPDF_FONTPATH',PHPGW_SERVER_ROOT.'/phpgwapi/inc/fpdf/font/'); |
---|
| 40 | require(PHPGW_SERVER_ROOT.'/phpgwapi/inc/fpdf/fpdf.php'); |
---|
| 41 | |
---|
| 42 | /** |
---|
| 43 | * wrapper class for FPDF |
---|
| 44 | * |
---|
| 45 | * @package phpgwapi |
---|
| 46 | * @author Lars Kneschke |
---|
| 47 | * @version 1.35 |
---|
| 48 | * @copyright Lars Kneschke 2004 |
---|
| 49 | * @license http://www.opensource.org/licenses/bsd-license.php BSD |
---|
| 50 | */ |
---|
| 51 | class pdf extends FPDF |
---|
| 52 | { |
---|
| 53 | function pdf() |
---|
| 54 | { |
---|
| 55 | parent::FPDF(); |
---|
| 56 | $this->SetCreator('eGroupWare '.$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']); |
---|
| 57 | $this->SetAuthor($GLOBALS['phpgw']->common->display_fullname()); |
---|
| 58 | } |
---|
| 59 | |
---|
| 60 | //Page footer |
---|
| 61 | function Footer() |
---|
| 62 | { |
---|
| 63 | //Position at 1.5 cm from bottom |
---|
| 64 | $this->SetY(-15); |
---|
| 65 | //Arial italic 8 |
---|
| 66 | $this->SetFont('Arial','I',8); |
---|
| 67 | //Page number |
---|
| 68 | $this->Cell(0,10,lang('Page').' '.$this->PageNo().'/{nb}',0,0,'C'); |
---|
| 69 | } |
---|
| 70 | } |
---|
| 71 | ?> |
---|