📄 tcpdf.php
字号:
protected $author; /** * @var keywords * @access protected */ protected $keywords; /** * @var creator * @access protected */ protected $creator; /** * @var alias for total number of pages * @access protected */ protected $AliasNbPages; /** * @var right-bottom corner X coordinate of inserted image * @since 2002-07-31 * @author Nicola Asuni * @access protected */ protected $img_rb_x; /** * @var right-bottom corner Y coordinate of inserted image * @since 2002-07-31 * @author Nicola Asuni * @access protected */ protected $img_rb_y; /** * @var image scale factor * @since 2004-06-14 * @author Nicola Asuni * @access protected */ protected $imgscale = 1; /** * @var boolean set to true when the input text is unicode (require unicode fonts) * @since 2005-01-02 * @author Nicola Asuni * @access protected */ protected $isunicode = false; /** * @var PDF version * @since 1.5.3 * @access protected */ protected $PDFVersion = "1.5"; // ---------------------- /** * @var Minimum distance between header and top page margin. * @access private */ private $header_margin; /** * @var Minimum distance between footer and bottom page margin. * @access private */ private $footer_margin; /** * @var original left margin value * @access private * @since 1.53.0.TC013 */ private $original_lMargin; /** * @var original right margin value * @access private * @since 1.53.0.TC013 */ private $original_rMargin; /** * @var Header font. * @access private */ private $header_font; /** * @var Footer font. * @access private */ private $footer_font; /** * @var Language templates. * @access private */ private $l; /** * @var Barcode to print on page footer (only if set). * @access private */ private $barcode = false; /** * @var If true prints header * @access private */ private $print_header = true; /** * @var If true prints footer. * @access private */ private $print_footer = true; /** * @var Header width (0 = full page width). * @access private */ private $header_width = 0; /** * @var Header image logo. * @access private */ private $header_logo = ""; /** * @var Header image logo width in mm. * @access private */ private $header_logo_width = 30; /** * @var String to print as title on document header. * @access private */ private $header_title = ""; /** * @var String to print on document header. * @access private */ private $header_string = ""; /** * @var Default number of columns for html table. * @access private */ private $default_table_columns = 4; // variables for html parser /** * @var HTML PARSER: store current link. * @access private */ private $HREF; /** * @var HTML PARSER: store font list. * @access private */ private $fontList; /** * @var HTML PARSER: true when font attribute is set. * @access private */ private $issetfont; /** * @var HTML PARSER: true when color attribute is set. * @access private */ private $issetcolor; /** * @var HTML PARSER: true in case of ordered list (OL), false otherwise. * @access private */ private $listordered = false; /** * @var HTML PARSER: count list items. * @access private */ private $listcount = 0; /** * @var HTML PARSER: size of table border. * @access private */ private $tableborder = 0; /** * @var HTML PARSER: true at the beginning of table. * @access private */ private $tdbegin = false; /** * @var HTML PARSER: table width. * @access private */ private $tdwidth = 0; /** * @var HTML PARSER: table height. * @access private */ private $tdheight = 0; /** * @var HTML PARSER: table align. * @access private */ private $tdalign = "L"; /** * @var HTML PARSER: table background color. * @access private */ private $tdbgcolor = false; /** * @var Store temporary font size in points. * @access private */ private $tempfontsize = 10; /** * @var Bold font style status. * @access private */ private $b; /** * @var Underlined font style status. * @access private */ private $u; /** * @var Italic font style status. * @access private */ private $i; /** * @var spacer for LI tags. * @access private */ private $lispacer = ""; /** * @var default encoding * @access private * @since 1.53.0.TC010 */ private $encoding = "UTF-8"; /** * @var PHP internal encoding * @access private * @since 1.53.0.TC016 */ private $internal_encoding; /** * @var store previous fill color as RGB array * @access private * @since 1.53.0.TC017 */ private $prevFillColor = array(255,255,255); /** * @var store previous text color as RGB array * @access private * @since 1.53.0.TC017 */ private $prevTextColor = array(0,0,0); /** * @var store previous font family * @access private * @since 1.53.0.TC017 */ private $prevFontFamily; /** * @var store previous font style * @access private * @since 1.53.0.TC017 */ private $prevFontStyle; /** * @var indicates if the document language is Right-To-Left * @access private * @since 2.0.000 */ private $rtl = false; /** * @var used to force RTL or LTR string inversion * @access private * @since 2.0.000 */ private $tmprtl = false; // --- Variables used for document encryption: /** * Indicates whether document is protected * @access private * @since 2.0.000 (2008-01-02) */ private $encrypted; /** * U entry in pdf document * @access private * @since 2.0.000 (2008-01-02) */ private $Uvalue; /** * O entry in pdf document * @access private * @since 2.0.000 (2008-01-02) */ private $Ovalue; /** * P entry in pdf document * @access private * @since 2.0.000 (2008-01-02) */ private $Pvalue; /** * encryption object id * @access private * @since 2.0.000 (2008-01-02) */ private $enc_obj_id; /** * last RC4 key encrypted (cached for optimisation) * @access private * @since 2.0.000 (2008-01-02) */ private $last_rc4_key; /** * last RC4 computed key * @access private * @since 2.0.000 (2008-01-02) */ private $last_rc4_key_c; // --- bookmark --- /** * Outlines for bookmark * @access private * @since 2.1.002 (2008-02-12) */ private $outlines = array(); /** * Outline root for bookmark * @access private * @since 2.1.002 (2008-02-12) */ private $OutlineRoot; // --- javascript and form --- /** * javascript code * @access private * @since 2.1.002 (2008-02-12) */ private $javascript = ""; /** * javascript counter * @access private * @since 2.1.002 (2008-02-12) */ private $n_js; //------------------------------------------------------------ // Public methods //------------------------------------------------------------ /** * This is the class constructor. * It allows to set up the page format, the orientation and * the measure unit used in all the methods (except for the font sizes). * @since 1.0 * @param string $orientation page orientation. Possible values are (case insensitive):<ul><li>P or Portrait (default)</li><li>L or Landscape</li></ul> * @param string $unit User measure unit. Possible values are:<ul><li>pt: point</li><li>mm: millimeter (default)</li><li>cm: centimeter</li><li>in: inch</li></ul><br />A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. * @param mixed $format The format used for pages. It can be either one of the following values (case insensitive) or a custom format in the form of a two-element array containing the width and the height (expressed in the unit given by unit).<ul><li>4A0</li><li>2A0</li><li>A0</li><li>A1</li><li>A2</li><li>A3</li><li>A4 (default)</li><li>A5</li><li>A6</li><li>A7</li><li>A8</li><li>A9</li><li>A10</li><li>B0</li><li>B1</li><li>B2</li><li>B3</li><li>B4</li><li>B5</li><li>B6</li><li>B7</li><li>B8</li><li>B9</li><li>B10</li><li>C0</li><li>C1</li><li>C2</li><li>C3</li><li>C4</li><li>C5</li><li>C6</li><li>C7</li><li>C8</li><li>C9</li><li>C10</li><li>RA0</li><li>RA1</li><li>RA2</li><li>RA3</li><li>RA4</li><li>SRA0</li><li>SRA1</li><li>SRA2</li><li>SRA3</li><li>SRA4</li><li>LETTER</li><li>LEGAL</li><li>EXECUTIVE</li><li>FOLIO</li></ul> * @param boolean $unicode TRUE means that the input text is unicode (default = true) * @param String $encoding charset encoding; default is UTF-8 */ public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding="UTF-8") { /* Set internal character encoding to ASCII */ if (function_exists("mb_internal_encoding") AND mb_internal_encoding()) { $this->internal_encoding = mb_internal_encoding(); mb_internal_encoding("ASCII"); } // set language direction $this->rtl = $this->l['a_meta_dir']=='rtl' ? true : false; $this->tmprtl = false; //Some checks $this->_dochecks(); //Initialization of properties $this->isunicode=$unicode; $this->page=0; $this->n=2;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -