source-class-Com.Tecnick.Pdf.ClassObjects

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:  * ClassObjects.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\Color\Pdf as ObjColor;
 20: use \Com\Tecnick\Barcode\Barcode as ObjBarcode;
 21: use \Com\Tecnick\File\File as ObjFile;
 22: use \Com\Tecnick\Unicode\Convert as ObjUniConvert;
 23: use \Com\Tecnick\Pdf\Encrypt\Encrypt as ObjEncrypt;
 24: use \Com\Tecnick\Pdf\Page\Page as ObjPage;
 25: use \Com\Tecnick\Pdf\Graph\Draw as ObjGraph;
 26: use \Com\Tecnick\Pdf\Font\Stack as ObjFont;
 27: use \Com\Tecnick\Pdf\Image\Import as ObjImage;
 28: 
 29: /**
 30:  * Com\Tecnick\Pdf\ClassObjects
 31:  *
 32:  * External class objects PDF class
 33:  *
 34:  * @since       2002-08-03
 35:  * @category    Library
 36:  * @package     Pdf
 37:  * @author      Nicola Asuni <info@tecnick.com>
 38:  * @copyright   2002-2017 Nicola Asuni - Tecnick.com LTD
 39:  * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
 40:  * @link        https://github.com/tecnickcom/tc-lib-pdf
 41:  */
 42: abstract class ClassObjects extends \Com\Tecnick\Pdf\MetaInfo
 43: {
 44:     /**
 45:      * Encrypt object
 46:      *
 47:      * @var \Com\Tecnick\Pdf\Encrypt\Encrypt
 48:      */
 49:     public $encrypt;
 50: 
 51:     /**
 52:      * Color object
 53:      *
 54:      * @var \Com\Tecnick\Color\Pdf
 55:      */
 56:     public $color;
 57: 
 58:     /**
 59:      * Barcode object
 60:      *
 61:      * @var \Com\Tecnick\Barcode\Barcode
 62:      */
 63:     public $barcode;
 64: 
 65:     /**
 66:      * File object
 67:      *
 68:      * @var \Com\Tecnick\File\File
 69:      */
 70:     public $file;
 71: 
 72:     /**
 73:      * Unicode Convert object
 74:      *
 75:      * @var \Com\Tecnick\Unicode\Convert
 76:      */
 77:     public $uniconv;
 78: 
 79:     /**
 80:      * Page object
 81:      *
 82:      * @var \Com\Tecnick\Pdf\Page\Page
 83:      */
 84:     public $page;
 85: 
 86:     /**
 87:      * Graph object
 88:      *
 89:      * @var \Com\Tecnick\Pdf\Graph\Draw
 90:      */
 91:     public $graph;
 92: 
 93:     /**
 94:      * Font object
 95:      *
 96:      * @var \Com\Tecnick\Pdf\Font\Stack
 97:      */
 98:     public $font;
 99: 
100:     /**
101:      * Image Import object
102:      *
103:      * @var \Com\Tecnick\Pdf\Image\Import
104:      */
105:     public $image;
106: 
107:     /**
108:      * Initialize class objects
109:      */
110:     protected function initClassObjects()
111:     {
112:         $this->color = new ObjColor;
113:         $this->barcode = new ObjBarcode;
114:         $this->file = new ObjFile;
115:         $this->uniconv = new ObjUniConvert;
116:         
117:         if ($this->encrypt === null) {
118:             $this->encrypt = new ObjEncrypt();
119:         }
120:         
121:         $this->page = new ObjPage(
122:             $this->unit,
123:             $this->color,
124:             $this->encrypt,
125:             $this->pdfa,
126:             $this->sigapp
127:         );
128:         $this->kunit = $this->page->getKUnit();
129: 
130:         $this->graph = new ObjGraph(
131:             $this->kunit,
132:             0, // $this->graph->setPageWidth($pagew)
133:             0, // $this->graph->setPageHeight($pageh)
134:             $this->color,
135:             $this->encrypt,
136:             $this->pdfa
137:         );
138: 
139:         $this->font = new ObjFont(
140:             $this->kunit,
141:             $this->subsetfont,
142:             $this->isunicode,
143:             $this->pdfa
144:         );
145:         
146:         $this->image = new ObjImage(
147:             $this->kunit,
148:             $this->encrypt,
149:             $this->pdfa
150:         );
151:     }
152: 
153:     /**
154:      * Enable or disable the the Signature Approval
155:      *
156:      * @param boolean $enabled It true enable the Signature Approval
157:      */
158:     protected function enableSignatureApproval($enabled = true)
159:     {
160:         $this->sigapp = (bool) $enabled;
161:         $this->page->enableSignatureApproval($this->sigapp);
162:         return $this;
163:     }
164: }
165: 
 

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