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