source: trunk/phpgwapi/inc/class.pdf.inc.php @ 5509

Revision 5509, 3.9 KB checked in by gustavo, 12 years ago (diff)

Ticket #2488 - Adicionar cabecalho de licenca em arquivos que nao o possuem

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