source-class-Com.Tecnick.Pdf.Tcpdf

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
  1: <?php
  2: /**
  3:  * Tcpdf.php
  4:  *
  5:  * @since       2002-08-03
  6:  * @category    Library
  7:  * @package     Pdf
  8:  * @author      Nicola Asuni <info@tecnick.com>
  9:  * @copyright   2002-2017 Nicola Asuni - Tecnick.com LTD
 10:  * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
 11:  * @link        https://github.com/tecnickcom/tc-lib-pdf
 12:  *
 13:  * This file is part of tc-lib-pdf software library.
 14:  */
 15: 
 16: namespace Com\Tecnick\Pdf;
 17: 
 18: use \Com\Tecnick\Pdf\Exception as PdfException;
 19: use \Com\Tecnick\Pdf\Encrypt\Encrypt as ObjEncrypt;
 20: 
 21: /**
 22:  * Com\Tecnick\Pdf\Tcpdf
 23:  *
 24:  * Tcpdf PDF class
 25:  *
 26:  * @since       2002-08-03
 27:  * @category    Library
 28:  * @package     Pdf
 29:  * @author      Nicola Asuni <info@tecnick.com>
 30:  * @copyright   2002-2017 Nicola Asuni - Tecnick.com LTD
 31:  * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
 32:  * @link        https://github.com/tecnickcom/tc-lib-pdf
 33:  */
 34: class Tcpdf extends \Com\Tecnick\Pdf\ClassObjects
 35: {
 36:     /**
 37:      * Document ID
 38:      *
 39:      * @var string
 40:      */
 41:     protected $fileid;
 42: 
 43:     /**
 44:      * Unit of measure
 45:      *
 46:      * @var string
 47:      */
 48:     protected $unit = 'mm';
 49: 
 50:     /**
 51:      * Unit of measure conversion ratio
 52:      *
 53:      * @var float
 54:      */
 55:     protected $kunit = 1.0;
 56: 
 57:     /**
 58:      * True if we are in PDF/A mode.
 59:      *
 60:      * @var bool
 61:      */
 62:     protected $pdfa = false;
 63: 
 64:     /**
 65:      * True if the signature approval is enabled (for incremental updates).
 66:      *
 67:      * @var bool
 68:      */
 69:     protected $sigapp = false;
 70: 
 71:     /**
 72:      * True to subset the fonts
 73:      *
 74:      * @var boolean
 75:      */
 76:     protected $subsetfont = false;
 77: 
 78:     /**
 79:      * True for Unicode font mode
 80:      *
 81:      * @var boolean
 82:      */
 83:     protected $isunicode = true;
 84: 
 85:     /**
 86:      * Current PDF object number
 87:      *
 88:      * @var int
 89:      */
 90:     protected $pon = 0;
 91: 
 92:     /**
 93:      * PDF version
 94:      *
 95:      * @var string
 96:      */
 97:     protected $pdfver = '1.7';
 98: 
 99:     /**
100:      * Initialize a new PDF object
101:      *
102:      * @param string     $unit        Unit of measure ('pt', 'mm', 'cm', 'in')
103:      * @param bool       $isunicode   True if the document is in Unicode mode
104:      * @param bool       $subsetfont  If true subset the embedded fonts to remove the unused characters
105:      * @param bool       $pdfa        True to produce a PDF/A document (some features will be bisabled)
106:      * @param ObjEncrypt $encobj      Encryption object
107:      */
108:     public function __construct(
109:         $unit = 'mm',
110:         $isunicode = true,
111:         $subsetfont = false,
112:         $pdfa = false,
113:         ObjEncrypt $encobj = null
114:     ) {
115:         setlocale(LC_NUMERIC, 'C');
116:         $this->doctime = time();
117:         $this->docmodtime = $this->doctime;
118:         $seedobj = new \Com\Tecnick\Pdf\Encrypt\Type\Seed();
119:         $this->fileid = md5($seedobj->encrypt('TCPDF'));
120:         $this->unit = $unit;
121:         $this->isunicode = $isunicode;
122:         $this->subsetfont = $subsetfont;
123:         $this->pdfa = $pdfa;
124:         $this->setPDFVersion();
125:         $this->encrypt = $encobj;
126:         $this->initClassObjects();
127:     }
128: }
129: 
 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy