Class: I2CE PDF (Development): Difference between revisions
(Created page with '{{otherversions|Class: I2CE_PDF}} This article describes the class ''I2CE_PDF'' . *Extends the class: tcpdf. *Location: Part of the module [[TextLayout Tools Module List (Develop…') |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
This article describes the class ''I2CE_PDF'' . | This article describes the class ''I2CE_PDF'' . | ||
*Extends the class: tcpdf. | *Extends the class: tcpdf. | ||
*Location: Part of the module [[TextLayout Tools Module List (Development)#textlayout|textlayout]] in the package [https://launchpad.net/textlayout TextLayout Tools] 4. | *Location: Part of the module [[TextLayout Tools Module List (Development)#textlayout|textlayout]] in the package [https://launchpad.net/textlayout TextLayout Tools] 4.1-dev | ||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L34 lib/I2CE_PDF.php] on line 34 | ||
==Variables== | ==Variables== | ||
===$print_header=== | ===$print_header=== | ||
true prints header @access protected | true prints header @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L41 textlayout/lib/I2CE_PDF.php] on line 41 | ||
*Type: protected If $print_header | *Type: protected If $print_header | ||
===$print_footer=== | ===$print_footer=== | ||
true prints footer. @access protected | true prints footer. @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L47 textlayout/lib/I2CE_PDF.php] on line 47 | ||
*Type: protected If $print_footer | *Type: protected If $print_footer | ||
===$header_width=== | ===$header_width=== | ||
width (0 = full page width). @access protected | width (0 = full page width). @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L53 textlayout/lib/I2CE_PDF.php] on line 53 | ||
*Type: protected Header $header_width | *Type: protected Header $header_width | ||
===$header_logo=== | ===$header_logo=== | ||
image logo. @access protected | image logo. @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L59 textlayout/lib/I2CE_PDF.php] on line 59 | ||
*Type: protected Header $header_logo | *Type: protected Header $header_logo | ||
===$header_logo_width=== | ===$header_logo_width=== | ||
image logo width in mm. @access protected | image logo width in mm. @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L65 textlayout/lib/I2CE_PDF.php] on line 65 | ||
*Type: protected Header $header_logo_width | *Type: protected Header $header_logo_width | ||
===$header_font=== | ===$header_font=== | ||
font. @access protected | font. @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L71 textlayout/lib/I2CE_PDF.php] on line 71 | ||
*Type: protected Header $header_font | *Type: protected Header $header_font | ||
===$footer_font=== | ===$footer_font=== | ||
font. @access protected | font. @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L77 textlayout/lib/I2CE_PDF.php] on line 77 | ||
*Type: protected Footer $footer_font | *Type: protected Footer $footer_font | ||
===$header_title=== | ===$header_title=== | ||
to print as title on document header. @access protected | to print as title on document header. @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L83 textlayout/lib/I2CE_PDF.php] on line 83 | ||
*Type: protected [http://www.php.net/manual/en/language.types.string.php String ] $header_title | *Type: protected [http://www.php.net/manual/en/language.types.string.php String ] $header_title | ||
===$header_string=== | ===$header_string=== | ||
to print on document header. @access protected | to print on document header. @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L89 textlayout/lib/I2CE_PDF.php] on line 89 | ||
*Type: protected [http://www.php.net/manual/en/language.types.string.php String ] $header_string | *Type: protected [http://www.php.net/manual/en/language.types.string.php String ] $header_string | ||
===$header_desc=== | ===$header_desc=== | ||
to print as a descroption under the logo in the document header @access protected $header_desc | to print as a descroption under the logo in the document header @access protected $header_desc | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L95 textlayout/lib/I2CE_PDF.php] on line 95 | ||
*Type: protected [http://www.php.net/manual/en/language.types.string.php String ] $header_desc | *Type: protected [http://www.php.net/manual/en/language.types.string.php String ] $header_desc | ||
===$header_desc_cell=== | |||
I2CE_TextCell The wordwrapped text cell with the header desc @access protected $header_desc_cell | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L102 textlayout/lib/I2CE_PDF.php] on line 102 | |||
*Type: protected protecterd $header_desc_cell | |||
===$header_margin=== | ===$header_margin=== | ||
distance between header and top page margin. @access protected | distance between header and top page margin. @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L109 textlayout/lib/I2CE_PDF.php] on line 109 | ||
*Type: protected Minimum $header_margin | *Type: protected Minimum $header_margin | ||
===$footer_margin=== | ===$footer_margin=== | ||
distance between footer and bottom page margin. @access protected | distance between footer and bottom page margin. @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L115 textlayout/lib/I2CE_PDF.php] on line 115 | ||
*Type: protected Minimum $footer_margin | *Type: protected Minimum $footer_margin | ||
===$original_lMargin=== | ===$original_lMargin=== | ||
left margin value @access protected @since 1.53.0.TC013 | left margin value @access protected @since 1.53.0.TC013 | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L122 textlayout/lib/I2CE_PDF.php] on line 122 | ||
*Type: protected original $original_lMargin | *Type: protected original $original_lMargin | ||
===$original_rMargin=== | ===$original_rMargin=== | ||
right margin value @access protected @since 1.53.0.TC013 | right margin value @access protected @since 1.53.0.TC013 | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L129 textlayout/lib/I2CE_PDF.php] on line 129 | ||
*Type: protected original $original_rMargin | *Type: protected original $original_rMargin | ||
===$enc=== | ===$enc=== | ||
protected @var I2CE_Encoding enc | protected @var I2CE_Encoding enc | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L134 textlayout/lib/I2CE_PDF.php] on line 134 | ||
*Type: protected $enc | *Type: protected $enc | ||
===$text_table=== | ===$text_table=== | ||
protected @var I2CE_TextTable $text_table | protected @var I2CE_TextTable $text_table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L140 textlayout/lib/I2CE_PDF.php] on line 140 | ||
*Type: protected $text_table | *Type: protected $text_table | ||
===$font_metric=== | ===$font_metric=== | ||
protected @var array of I2CE_FontMetric font_metrics | protected @var array of I2CE_FontMetric font_metrics | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L147 textlayout/lib/I2CE_PDF.php] on line 147 | ||
*Type: protected $font_metric | *Type: protected $font_metric | ||
===$running_header=== | ===$running_header=== | ||
True if we want the header of a table repeated on each page | True if we want the header of a table repeated on each page | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L152 textlayout/lib/I2CE_PDF.php] on line 152 | ||
*Type: protected [http://www.php.net/manual/en/language.types.boolean.php boolean ] $running_header | *Type: protected [http://www.php.net/manual/en/language.types.boolean.php boolean ] $running_header | ||
===$row_spacing=== | ===$row_spacing=== | ||
-- the spacing (in points) between succesive rows of text in a table | -- the spacing (in points) between succesive rows of text in a table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L157 textlayout/lib/I2CE_PDF.php] on line 157 | ||
*Type: protected [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $row_spacing | *Type: protected [http://www.php.net/manual/en/language.pseudo-types.php numeric ] $row_spacing | ||
===$adobe_standard_encodings=== | ===$adobe_standard_encodings=== | ||
of I2CE_Encodings $adobe_standard_encodings | of I2CE_Encodings $adobe_standard_encodings | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L162 textlayout/lib/I2CE_PDF.php] on line 162 | ||
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $adobe_standard_encodings | *Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $adobe_standard_encodings | ||
===$header_count=== | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L664 textlayout/lib/I2CE_PDF.php] on line 664 | |||
*Type: protected $header_count | |||
===$hyphen=== | |||
A | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L967 textlayout/lib/I2CE_PDF.php] on line 967 | |||
*Type: protected [[Class: I2CE_Hyphen (Development) | I2CE_Hyphen]] $hyphen | |||
===$min_cell_width=== | ===$min_cell_width=== | ||
the minimum number of points we want minimially as the width of a cell in a table | the minimum number of points we want minimially as the width of a cell in a table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1008 textlayout/lib/I2CE_PDF.php] on line 1008 | ||
*Type: protected [http://www.php.net/manual/en/language.types.integer.php int ] $min_cell_width | *Type: protected [http://www.php.net/manual/en/language.types.integer.php int ] $min_cell_width | ||
===$header_fill_color=== | ===$header_fill_color=== | ||
of int $header_fill_color for the fill color of the header row of a table | of int $header_fill_color for the fill color of the header row of a table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1014 textlayout/lib/I2CE_PDF.php] on line 1014 | ||
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $header_fill_color | *Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $header_fill_color | ||
===$header_text_color=== | ===$header_text_color=== | ||
of int $header_text_color for the text color of the header row of a table | of int $header_text_color for the text color of the header row of a table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1020 textlayout/lib/I2CE_PDF.php] on line 1020 | ||
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $header_text_color | *Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $header_text_color | ||
===$data_fill_color=== | ===$data_fill_color=== | ||
of int $header_fill_color for the fill color of the header row of a table | of int $header_fill_color for the fill color of the header row of a table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1026 textlayout/lib/I2CE_PDF.php] on line 1026 | ||
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $data_fill_color | *Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $data_fill_color | ||
===$table_framing_color=== | ===$table_framing_color=== | ||
of int $table_framing_color the color used to draw the frame for the table | of int $table_framing_color the color used to draw the frame for the table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1031 textlayout/lib/I2CE_PDF.php] on line 1031 | ||
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $table_framing_color | *Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $table_framing_color | ||
===$data_text_color=== | ===$data_text_color=== | ||
of int $header_text_color for the text color of the header row of a table | of int $header_text_color for the text color of the header row of a table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1037 textlayout/lib/I2CE_PDF.php] on line 1037 | ||
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $data_text_color | *Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $data_text_color | ||
===$algorithm=== | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1042 textlayout/lib/I2CE_PDF.php] on line 1042 | |||
*Type: protected $algorithm | |||
===$glyph_list=== | ===$glyph_list=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1446 textlayout/lib/I2CE_PDF.php] on line 1446 | ||
*Type: protected $glyph_list | *Type: protected $glyph_list | ||
Line 147: | Line 160: | ||
===AddCoreFontMetrics()=== | ===AddCoreFontMetrics()=== | ||
Add a Core PDF Font | Add a Core PDF Font | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L384 textlayout/lib/I2CE_PDF.php] on line 384 | ||
*Signature: protected function AddCoreFontMetrics($family,$style) | *Signature: protected function AddCoreFontMetrics($family,$style) | ||
*Parameters: | *Parameters: | ||
Line 154: | Line 167: | ||
***Default Value: '' | ***Default Value: '' | ||
===AddFontByTTFFile()=== | ===AddFontByTTFFile()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L326 textlayout/lib/I2CE_PDF.php] on line 326 | ||
*Signature: public function AddFontByTTFFile($family,$style,$ttf_file) | *Signature: public function AddFontByTTFFile($family,$style,$ttf_file) | ||
*Parameters: | *Parameters: | ||
Line 162: | Line 175: | ||
===AddPage()=== | ===AddPage()=== | ||
Adds a new page to the document. If a page is already present, the Footer() method is called first to output the footer. Then the page is added, the current position set to the top-left corner according to the left and top margins, and Header() is called to display the header. The font which was set before calling is automatically restored. There is no need to call SetFont() again if you want to continue with the same font. The same is true for colors and line width. The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards. | Adds a new page to the document. If a page is already present, the Footer() method is called first to output the footer. Then the page is added, the current position set to the top-left corner according to the left and top margins, and Header() is called to display the header. The font which was set before calling is automatically restored. There is no need to call SetFont() again if you want to continue with the same font. The same is true for colors and line width. The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L502 textlayout/lib/I2CE_PDF.php] on line 502 | ||
*Signature: public function AddPage($orientation) | *Signature: public function AddPage($orientation) | ||
*Parameters: | *Parameters: | ||
Line 168: | Line 181: | ||
***Default Value: '' | ***Default Value: '' | ||
===Cell()=== | ===Cell()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L791 textlayout/lib/I2CE_PDF.php] on line 791 | ||
*Signature: public function Cell($w,$h,$txt,$border,$ln,$align,$fill,$link) | *Signature: public function Cell($w,$h,$txt,$border,$ln,$align,$fill,$link,$stretch) | ||
*Parameters: | *Parameters: | ||
**$w | **$w | ||
Line 186: | Line 199: | ||
**$link | **$link | ||
***Default Value: '' | ***Default Value: '' | ||
**$stretch | |||
***Default Value: 0 | |||
===DisplayTextTableRow()=== | ===DisplayTextTableRow()=== | ||
Draws a Text Table Row using wordwrapped rows @param array of array of strings $row_data. first index is column, second index is the text row in the cell | Draws a Text Table Row using wordwrapped rows @param array of array of strings $row_data. first index is column, second index is the text row in the cell | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1330 textlayout/lib/I2CE_PDF.php] on line 1330 | ||
*Signature: protected function DisplayTextTableRow($row_data,$widths,$h_user,$border,$align,$fill) | *Signature: protected function DisplayTextTableRow($row_data,$widths,$h_user,$border,$align,$fill) | ||
*Parameters: | *Parameters: | ||
Line 198: | Line 213: | ||
**$fill | **$fill | ||
===Error()=== | ===Error()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L184 textlayout/lib/I2CE_PDF.php] on line 184 | ||
*Signature: public function Error($msg,$level) | *Signature: public function Error($msg,$level) | ||
*Parameters: | *Parameters: | ||
Line 205: | Line 220: | ||
***Default Value: E_WARNING | ***Default Value: E_WARNING | ||
===GetStringWidth()=== | ===GetStringWidth()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L573 textlayout/lib/I2CE_PDF.php] on line 573 | ||
*Signature: public function GetStringWidth($s) | *Signature: public function GetStringWidth($s) | ||
*Parameters: | *Parameters: | ||
Line 211: | Line 226: | ||
===GetTableWidths()=== | ===GetTableWidths()=== | ||
Set the widths of the columns last used in the table | Set the widths of the columns last used in the table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1077 textlayout/lib/I2CE_PDF.php] on line 1077 | ||
*Signature: public function GetTableWidths() | *Signature: public function GetTableWidths() | ||
===GetTextTable()=== | ===GetTextTable()=== | ||
Get the TextTable object | Get the TextTable object | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L910 textlayout/lib/I2CE_PDF.php] on line 910 | ||
*Signature: public function GetTextTable() | *Signature: public function GetTextTable() | ||
*Returns: TextTable | *Returns: TextTable | ||
===Header()=== | ===Header()=== | ||
This method is used to render the page header. | This method is used to render the page header. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L668 textlayout/lib/I2CE_PDF.php] on line 668 | ||
*Signature: public function Header() | *Signature: public function Header() | ||
===MakeTable()=== | ===MakeTable()=== | ||
Given a 2-dimensional table of string prints out a 'fancy' table @param float $w width of the table, 0 goes to right margin in user units @param float $h height of each row of text in user units @param array $text_table 2 dimensional array of text (indexing is [$row][$col]) .. Row has to be numeric sequential starting at 0. Column does not | Given a 2-dimensional table of string prints out a 'fancy' table @param float $w width of the table, 0 goes to right margin in user units @param float $h height of each row of text in user units @param array $text_table 2 dimensional array of text (indexing is [$row][$col]) .. Row has to be numeric sequential starting at 0. Column does not | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1147 textlayout/lib/I2CE_PDF.php] on line 1147 | ||
*Signature: public function MakeTable($text_table_data,$border,$max_table_width,$align_data,$header,$align_header,$ln) | *Signature: public function MakeTable($text_table_data,$border,$max_table_width,$align_data,$header,$align_header,$ln) | ||
*Parameters: | *Parameters: | ||
Line 242: | Line 257: | ||
===SetAutoTableWidthStyle()=== | ===SetAutoTableWidthStyle()=== | ||
Set the alogorithm used to determine column widths | Set the alogorithm used to determine column widths | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1061 textlayout/lib/I2CE_PDF.php] on line 1061 | ||
*Signature: public function SetAutoTableWidthStyle($style) | *Signature: public function SetAutoTableWidthStyle($style) | ||
*Parameters: | *Parameters: | ||
Line 248: | Line 263: | ||
===SetFont()=== | ===SetFont()=== | ||
Sets the font used to print character strings. It is mandatory to call this method at least once before printing text or the resulting document would not be valid. The font can be either a standard one or a font added via the AddFont() method. Standard fonts use Windows encoding cp1252 (Western Europe). The method can be called before the first page is created and the font is retained from page to page. If you just wish to change the current font size, it is simpler to call SetFontSize(). Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:<ul><li>They are in the current directory (the one where the running script lies)</li><li>They are in one of the directories defined by the include_path parameter</li><li>They are in the directory defined by the FPDF_FONTPATH constant</li></ul><br /> Example for the last case (note the trailing slash):<br /> <pre> define('FPDF_FONTPATH','/home/www/font/'); require('tcpdf.php'); //Times regular 12 $pdf->SetFont('Times'); //Arial bold 14 $pdf->SetFont('Arial','B',14); //Removes bold $pdf->SetFont(''); //Times bold, italic and underlined 14 $pdf->SetFont('Times','BIU'); </pre><br /> If the file corresponding to the requested font is not found, the error "Could not include font metric file" is generated. | Sets the font used to print character strings. It is mandatory to call this method at least once before printing text or the resulting document would not be valid. The font can be either a standard one or a font added via the AddFont() method. Standard fonts use Windows encoding cp1252 (Western Europe). The method can be called before the first page is created and the font is retained from page to page. If you just wish to change the current font size, it is simpler to call SetFontSize(). Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:<ul><li>They are in the current directory (the one where the running script lies)</li><li>They are in one of the directories defined by the include_path parameter</li><li>They are in the directory defined by the FPDF_FONTPATH constant</li></ul><br /> Example for the last case (note the trailing slash):<br /> <pre> define('FPDF_FONTPATH','/home/www/font/'); require('tcpdf.php'); //Times regular 12 $pdf->SetFont('Times'); //Arial bold 14 $pdf->SetFont('Arial','B',14); //Removes bold $pdf->SetFont(''); //Times bold, italic and underlined 14 $pdf->SetFont('Times','BIU'); </pre><br /> If the file corresponding to the requested font is not found, the error "Could not include font metric file" is generated. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L454 textlayout/lib/I2CE_PDF.php] on line 454 | ||
*Signature: public function SetFont($family,$style,$size) | *Signature: public function SetFont($family,$style,$size) | ||
*Parameters: | *Parameters: | ||
Line 258: | Line 273: | ||
===SetFontSize()=== | ===SetFontSize()=== | ||
Defines the size of the current font. | Defines the size of the current font. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L589 textlayout/lib/I2CE_PDF.php] on line 589 | ||
*Signature: public function SetFontSize($size) | *Signature: public function SetFontSize($size) | ||
*Parameters: | *Parameters: | ||
Line 264: | Line 279: | ||
===SetHyphenationDictionary()=== | ===SetHyphenationDictionary()=== | ||
set the hyphenation dictionary used for text tables | set the hyphenation dictionary used for text tables | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L973 textlayout/lib/I2CE_PDF.php] on line 973 | ||
*Signature: public function SetHyphenationDictionary($hyphen) | *Signature: public function SetHyphenationDictionary($hyphen) | ||
*Parameters: | *Parameters: | ||
Line 270: | Line 285: | ||
===SetLineSpacing()=== | ===SetLineSpacing()=== | ||
Set the spacing between rows of the table | Set the spacing between rows of the table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L934 textlayout/lib/I2CE_PDF.php] on line 934 | ||
*Signature: public function SetLineSpacing($spacing) | *Signature: public function SetLineSpacing($spacing) | ||
*Parameters: | *Parameters: | ||
Line 276: | Line 291: | ||
===SetMaxTableWidth()=== | ===SetMaxTableWidth()=== | ||
Set the maximum width of the table width | Set the maximum width of the table width | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L997 textlayout/lib/I2CE_PDF.php] on line 997 | ||
*Signature: public function SetMaxTableWidth($width) | *Signature: public function SetMaxTableWidth($width) | ||
*Parameters: | *Parameters: | ||
Line 282: | Line 297: | ||
===SetMinTableCellWidth()=== | ===SetMinTableCellWidth()=== | ||
Set the minimum cell width of the table | Set the minimum cell width of the table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L918 textlayout/lib/I2CE_PDF.php] on line 918 | ||
*Signature: public function SetMinTableCellWidth($width) | *Signature: public function SetMinTableCellWidth($width) | ||
*Parameters: | *Parameters: | ||
Line 288: | Line 303: | ||
===SetRunningHeader()=== | ===SetRunningHeader()=== | ||
Set a running header for tables that span multiple pages | Set a running header for tables that span multiple pages | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L989 textlayout/lib/I2CE_PDF.php] on line 989 | ||
*Signature: public function SetRunningHeader($running_header) | *Signature: public function SetRunningHeader($running_header) | ||
*Parameters: | *Parameters: | ||
Line 294: | Line 309: | ||
===SetTableColSpacing()=== | ===SetTableColSpacing()=== | ||
Set the spacing between columns of the table | Set the spacing between columns of the table | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L926 textlayout/lib/I2CE_PDF.php] on line 926 | ||
*Signature: public function SetTableColSpacing($spacing) | *Signature: public function SetTableColSpacing($spacing) | ||
*Parameters: | *Parameters: | ||
Line 300: | Line 315: | ||
===SetTableDataFillColor()=== | ===SetTableDataFillColor()=== | ||
Set the data fill color for a table @param array of $int -- the rgb values | Set the data fill color for a table @param array of $int -- the rgb values | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1116 textlayout/lib/I2CE_PDF.php] on line 1116 | ||
*Signature: public function SetTableDataFillColor($color) | *Signature: public function SetTableDataFillColor($color) | ||
*Parameters: | *Parameters: | ||
Line 306: | Line 321: | ||
===SetTableDataTextColor()=== | ===SetTableDataTextColor()=== | ||
Set the data text color for a table @param array of $int -- the rgb values | Set the data text color for a table @param array of $int -- the rgb values | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1127 textlayout/lib/I2CE_PDF.php] on line 1127 | ||
*Signature: public function SetTableDataTextColor($color) | *Signature: public function SetTableDataTextColor($color) | ||
*Parameters: | *Parameters: | ||
Line 312: | Line 327: | ||
===SetTableFramingColor()=== | ===SetTableFramingColor()=== | ||
Set the framing color for a table @param array of $int -- the rgb values | Set the framing color for a table @param array of $int -- the rgb values | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1106 textlayout/lib/I2CE_PDF.php] on line 1106 | ||
*Signature: public function SetTableFramingColor($color) | *Signature: public function SetTableFramingColor($color) | ||
*Parameters: | *Parameters: | ||
Line 318: | Line 333: | ||
===SetTableHeaderFillColor()=== | ===SetTableHeaderFillColor()=== | ||
Set the header of a table's fill color @param array of $int -- the rgb values | Set the header of a table's fill color @param array of $int -- the rgb values | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1088 textlayout/lib/I2CE_PDF.php] on line 1088 | ||
*Signature: public function SetTableHeaderFillColor($color) | *Signature: public function SetTableHeaderFillColor($color) | ||
*Parameters: | *Parameters: | ||
Line 324: | Line 339: | ||
===SetTableHeaderTextColor()=== | ===SetTableHeaderTextColor()=== | ||
Set the header of a table's text color @param array of $int -- the rgb values | Set the header of a table's text color @param array of $int -- the rgb values | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1097 textlayout/lib/I2CE_PDF.php] on line 1097 | ||
*Signature: public function SetTableHeaderTextColor($color) | *Signature: public function SetTableHeaderTextColor($color) | ||
*Parameters: | *Parameters: | ||
Line 330: | Line 345: | ||
===SetTableWitdths()=== | ===SetTableWitdths()=== | ||
Set the widths of the columns used in the table explicitly @parma array of number $widths -- the column widths Note: setting table width will set the table width style to explicit | Set the widths of the columns used in the table explicitly @parma array of number $widths -- the column widths Note: setting table width will set the table width style to explicit | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1070 textlayout/lib/I2CE_PDF.php] on line 1070 | ||
*Signature: public function SetTableWitdths($widths) | *Signature: public function SetTableWitdths($widths) | ||
*Parameters: | *Parameters: | ||
Line 336: | Line 351: | ||
===SetWordWrapAlgorithm()=== | ===SetWordWrapAlgorithm()=== | ||
Set the alogorithm used to determine word-wrapping | Set the alogorithm used to determine word-wrapping | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1047 textlayout/lib/I2CE_PDF.php] on line 1047 | ||
*Signature: public function SetWordWrapAlgorithm($algorithm) | *Signature: public function SetWordWrapAlgorithm($algorithm) | ||
*Parameters: | *Parameters: | ||
Line 342: | Line 357: | ||
===__construct()=== | ===__construct()=== | ||
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). @param I2CE_Encoding $enc charset encoding for all input strings | 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). @param I2CE_Encoding $enc charset encoding for all input strings | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L173 textlayout/lib/I2CE_PDF.php] on line 173 | ||
*Signature: public function __construct($encoding,$orientation,$unit,$format) | *Signature: public function __construct($encoding,$orientation,$unit,$format) | ||
*Parameters: | *Parameters: | ||
Line 354: | Line 369: | ||
===_escapetext()=== | ===_escapetext()=== | ||
Format a text string @access protected | Format a text string @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L626 textlayout/lib/I2CE_PDF.php] on line 626 | ||
*Signature: public function _escapetext($s) | *Signature: public function _escapetext($s) | ||
*Parameters: | *Parameters: | ||
Line 360: | Line 375: | ||
===_putfonts()=== | ===_putfonts()=== | ||
Adds fonts _putfonts @access protected | Adds fonts _putfonts @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1601 textlayout/lib/I2CE_PDF.php] on line 1601 | ||
*Signature: protected function _putfonts() | *Signature: protected function _putfonts() | ||
===_puttruetypeembedded()=== | ===_puttruetypeembedded()=== | ||
Adds unicode fonts.<br> Based on PDF Reference 1.3 (section 5) @access protected @author Nicola Asuni @since 1.52.0.TC005 (2005-01-05) | Adds unicode fonts.<br> Based on PDF Reference 1.3 (section 5) @access protected @author Nicola Asuni @since 1.52.0.TC005 (2005-01-05) | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1488 textlayout/lib/I2CE_PDF.php] on line 1488 | ||
*Signature: protected function _puttruetypeembedded($font) | *Signature: protected function _puttruetypeembedded($font) | ||
*Parameters: | *Parameters: | ||
Line 370: | Line 385: | ||
===_textstring()=== | ===_textstring()=== | ||
Format a text string @access protected | Format a text string @access protected | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L613 textlayout/lib/I2CE_PDF.php] on line 613 | ||
*Signature: protected function _textstring($s) | *Signature: protected function _textstring($s) | ||
*Parameters: | *Parameters: | ||
**$s | **$s | ||
===addImageContent()=== | |||
Add image content | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L194 textlayout/lib/I2CE_PDF.php] on line 194 | |||
*Signature: public function addImageContent($content,$reference_name) | |||
*Parameters: | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $content <br/>The image binary data | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $reference_name <br/>A "fake" file name to reference the image content when calling {Image()}. Should include the correct extension for the file | |||
===displayTextCell()=== | |||
Puts in a wordwrapped text cell | |||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L753 textlayout/lib/I2CE_PDF.php] on line 753 | |||
*Signature: protected function displayTextCell($text_cell,$text) | |||
*Parameters: | |||
** [[Class: I2CE_TextCell (Development) | I2CE_TextCell]] $text_cell | |||
** [http://www.php.net/manual/en/language.types.string.php string ] $text | |||
===getAdobeStandardEncoding()=== | ===getAdobeStandardEncoding()=== | ||
Get the I2CE_Encoding according to one of the standard adobe encodings | Get the I2CE_Encoding according to one of the standard adobe encodings | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1416 textlayout/lib/I2CE_PDF.php] on line 1416 | ||
*Signature: protected function getAdobeStandardEncoding($encoding) | *Signature: protected function getAdobeStandardEncoding($encoding) | ||
*Parameters: | *Parameters: | ||
Line 382: | Line 411: | ||
===getDescription()=== | ===getDescription()=== | ||
Setup the array the required fields for the FontDescriptor entry The required fields are 'Ascent' 'Descent' 'CapHeight' 'Flags' 'FontBBox' 'ItalicAngle' 'StemV' 'MissingWidth' | Setup the array the required fields for the FontDescriptor entry The required fields are 'Ascent' 'Descent' 'CapHeight' 'Flags' 'FontBBox' 'ItalicAngle' 'StemV' 'MissingWidth' | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L271 textlayout/lib/I2CE_PDF.php] on line 271 | ||
*Signature: protected function getDescription($fm,$uses_adobe_standard_encoding) | *Signature: protected function getDescription($fm,$uses_adobe_standard_encoding) | ||
*Parameters: | *Parameters: | ||
Line 389: | Line 418: | ||
===getFontKey()=== | ===getFontKey()=== | ||
get the fontkey associated to a fmaily and style | get the fontkey associated to a fmaily and style | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L231 textlayout/lib/I2CE_PDF.php] on line 231 | ||
*Signature: protected function getFontKey($family,$style) | *Signature: protected function getFontKey($family,$style,$modify_style) | ||
*Parameters: | *Parameters: | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $family | ** [http://www.php.net/manual/en/language.types.string.php string ] $family | ||
** [http://www.php.net/manual/en/language.types.string.php string ] $style | ** [http://www.php.net/manual/en/language.types.string.php string ] $style | ||
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $modify_style | |||
***Default Value: false | |||
*Returns: [http://www.php.net/manual/en/language.types.string.php string ] | *Returns: [http://www.php.net/manual/en/language.types.string.php string ] | ||
===loadGlyphList()=== | ===loadGlyphList()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1463 textlayout/lib/I2CE_PDF.php] on line 1463 | ||
*Signature: protected function loadGlyphList() | *Signature: protected function loadGlyphList() | ||
===load_file()=== | ===load_file()=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L1448 textlayout/lib/I2CE_PDF.php] on line 1448 | ||
*Signature: protected function load_file($category,$file_name) | *Signature: protected function load_file($category,$file_name) | ||
*Parameters: | *Parameters: | ||
Line 406: | Line 437: | ||
===setHeaderData()=== | ===setHeaderData()=== | ||
Set header data. @param string $ln header image logo | Set header data. @param string $ln header image logo | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L946 textlayout/lib/I2CE_PDF.php] on line 946 | ||
*Signature: public function setHeaderData($logo,$lw,$ht,$hs,$hd) | *Signature: public function setHeaderData($logo,$lw,$ht,$hs,$hd) | ||
*Parameters: | *Parameters: | ||
Line 421: | Line 452: | ||
===setHeaderMargin()=== | ===setHeaderMargin()=== | ||
Set header margin. (minimum distance between header and top page margin) | Set header margin. (minimum distance between header and top page margin) | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L642 textlayout/lib/I2CE_PDF.php] on line 642 | ||
*Signature: public function setHeaderMargin($hm) | *Signature: public function setHeaderMargin($hm) | ||
*Parameters: | *Parameters: | ||
Line 428: | Line 459: | ||
===setHeaderWidth()=== | ===setHeaderWidth()=== | ||
Sets header width | Sets header width | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L651 textlayout/lib/I2CE_PDF.php] on line 651 | ||
*Signature: public function setHeaderWidth($w) | *Signature: public function setHeaderWidth($w) | ||
*Parameters: | *Parameters: | ||
Line 435: | Line 466: | ||
===setPrintHeader()=== | ===setPrintHeader()=== | ||
Set a flag to print page header. | Set a flag to print page header. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/textlayout/4.1-dev/annotate/head:/lib/I2CE_PDF.php#L659 textlayout/lib/I2CE_PDF.php] on line 659 | ||
*Signature: public function setPrintHeader($val) | *Signature: public function setPrintHeader($val) | ||
*Parameters: | *Parameters: |
Latest revision as of 08:16, 6 May 2015
This article describes the class I2CE_PDF .
- Extends the class: tcpdf.
- Location: Part of the module textlayout in the package TextLayout Tools 4.1-dev
- Source: Defined in the file lib/I2CE_PDF.php on line 34
Variables
$print_header
true prints header @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 41
- Type: protected If $print_header
true prints footer. @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 47
- Type: protected If $print_footer
$header_width
width (0 = full page width). @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 53
- Type: protected Header $header_width
$header_logo
image logo. @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 59
- Type: protected Header $header_logo
$header_logo_width
image logo width in mm. @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 65
- Type: protected Header $header_logo_width
$header_font
font. @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 71
- Type: protected Header $header_font
font. @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 77
- Type: protected Footer $footer_font
$header_title
to print as title on document header. @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 83
- Type: protected String $header_title
$header_string
to print on document header. @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 89
- Type: protected String $header_string
$header_desc
to print as a descroption under the logo in the document header @access protected $header_desc
- Defined in textlayout/lib/I2CE_PDF.php on line 95
- Type: protected String $header_desc
$header_desc_cell
I2CE_TextCell The wordwrapped text cell with the header desc @access protected $header_desc_cell
- Defined in textlayout/lib/I2CE_PDF.php on line 102
- Type: protected protecterd $header_desc_cell
$header_margin
distance between header and top page margin. @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 109
- Type: protected Minimum $header_margin
distance between footer and bottom page margin. @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 115
- Type: protected Minimum $footer_margin
$original_lMargin
left margin value @access protected @since 1.53.0.TC013
- Defined in textlayout/lib/I2CE_PDF.php on line 122
- Type: protected original $original_lMargin
$original_rMargin
right margin value @access protected @since 1.53.0.TC013
- Defined in textlayout/lib/I2CE_PDF.php on line 129
- Type: protected original $original_rMargin
$enc
protected @var I2CE_Encoding enc
- Defined in textlayout/lib/I2CE_PDF.php on line 134
- Type: protected $enc
$text_table
protected @var I2CE_TextTable $text_table
- Defined in textlayout/lib/I2CE_PDF.php on line 140
- Type: protected $text_table
$font_metric
protected @var array of I2CE_FontMetric font_metrics
- Defined in textlayout/lib/I2CE_PDF.php on line 147
- Type: protected $font_metric
$running_header
True if we want the header of a table repeated on each page
- Defined in textlayout/lib/I2CE_PDF.php on line 152
- Type: protected boolean $running_header
$row_spacing
-- the spacing (in points) between succesive rows of text in a table
- Defined in textlayout/lib/I2CE_PDF.php on line 157
- Type: protected numeric $row_spacing
$adobe_standard_encodings
of I2CE_Encodings $adobe_standard_encodings
- Defined in textlayout/lib/I2CE_PDF.php on line 162
- Type: protected array $adobe_standard_encodings
$header_count
- Defined in textlayout/lib/I2CE_PDF.php on line 664
- Type: protected $header_count
$hyphen
A
- Defined in textlayout/lib/I2CE_PDF.php on line 967
- Type: protected I2CE_Hyphen $hyphen
$min_cell_width
the minimum number of points we want minimially as the width of a cell in a table
- Defined in textlayout/lib/I2CE_PDF.php on line 1008
- Type: protected int $min_cell_width
$header_fill_color
of int $header_fill_color for the fill color of the header row of a table
- Defined in textlayout/lib/I2CE_PDF.php on line 1014
- Type: protected array $header_fill_color
$header_text_color
of int $header_text_color for the text color of the header row of a table
- Defined in textlayout/lib/I2CE_PDF.php on line 1020
- Type: protected array $header_text_color
$data_fill_color
of int $header_fill_color for the fill color of the header row of a table
- Defined in textlayout/lib/I2CE_PDF.php on line 1026
- Type: protected array $data_fill_color
$table_framing_color
of int $table_framing_color the color used to draw the frame for the table
- Defined in textlayout/lib/I2CE_PDF.php on line 1031
- Type: protected array $table_framing_color
$data_text_color
of int $header_text_color for the text color of the header row of a table
- Defined in textlayout/lib/I2CE_PDF.php on line 1037
- Type: protected array $data_text_color
$algorithm
- Defined in textlayout/lib/I2CE_PDF.php on line 1042
- Type: protected $algorithm
$glyph_list
- Defined in textlayout/lib/I2CE_PDF.php on line 1446
- Type: protected $glyph_list
Methods
AddCoreFontMetrics()
Add a Core PDF Font
- Defined in textlayout/lib/I2CE_PDF.php on line 384
- Signature: protected function AddCoreFontMetrics($family,$style)
- Parameters:
AddFontByTTFFile()
- Defined in textlayout/lib/I2CE_PDF.php on line 326
- Signature: public function AddFontByTTFFile($family,$style,$ttf_file)
- Parameters:
- $family
- $style
- $ttf_file
AddPage()
Adds a new page to the document. If a page is already present, the Footer() method is called first to output the footer. Then the page is added, the current position set to the top-left corner according to the left and top margins, and Header() is called to display the header. The font which was set before calling is automatically restored. There is no need to call SetFont() again if you want to continue with the same font. The same is true for colors and line width. The origin of the coordinate system is at the top-left corner and increasing ordinates go downwards.
- Defined in textlayout/lib/I2CE_PDF.php on line 502
- Signature: public function AddPage($orientation)
- Parameters:
- string $orientation
Page orientation. Possible values are (case insensitive):- P or Portrait
- L or Landscape
- Default Value:
- string $orientation
Cell()
- Defined in textlayout/lib/I2CE_PDF.php on line 791
- Signature: public function Cell($w,$h,$txt,$border,$ln,$align,$fill,$link,$stretch)
- Parameters:
- $w
- $h
- Default Value: 0
- $txt
- Default Value:
- $border
- Default Value: 0
- $ln
- Default Value: 0
- $align
- Default Value:
- $fill
- Default Value: 0
- $link
- Default Value:
- $stretch
- Default Value: 0
DisplayTextTableRow()
Draws a Text Table Row using wordwrapped rows @param array of array of strings $row_data. first index is column, second index is the text row in the cell
- Defined in textlayout/lib/I2CE_PDF.php on line 1330
- Signature: protected function DisplayTextTableRow($row_data,$widths,$h_user,$border,$align,$fill)
- Parameters:
- $row_data
- $widths
- numeric $h_user
the height in user units @param array of numeric $widths in user units * - $border
- $align
- $fill
Error()
- Defined in textlayout/lib/I2CE_PDF.php on line 184
- Signature: public function Error($msg,$level)
- Parameters:
- $msg
- $level
- Default Value: E_WARNING
GetStringWidth()
- Defined in textlayout/lib/I2CE_PDF.php on line 573
- Signature: public function GetStringWidth($s)
- Parameters:
- $s
GetTableWidths()
Set the widths of the columns last used in the table
- Defined in textlayout/lib/I2CE_PDF.php on line 1077
- Signature: public function GetTableWidths()
GetTextTable()
Get the TextTable object
- Defined in textlayout/lib/I2CE_PDF.php on line 910
- Signature: public function GetTextTable()
- Returns: TextTable
Header()
This method is used to render the page header.
- Defined in textlayout/lib/I2CE_PDF.php on line 668
- Signature: public function Header()
MakeTable()
Given a 2-dimensional table of string prints out a 'fancy' table @param float $w width of the table, 0 goes to right margin in user units @param float $h height of each row of text in user units @param array $text_table 2 dimensional array of text (indexing is [$row][$col]) .. Row has to be numeric sequential starting at 0. Column does not
- Defined in textlayout/lib/I2CE_PDF.php on line 1147
- Signature: public function MakeTable($text_table_data,$border,$max_table_width,$align_data,$header,$align_header,$ln)
- Parameters:
- $text_table_data
- mixed $border
Indicates if borders must be drawn around the cell block. The value can be:- 0: no border (default)
- 1: frame
- Default Value: 0
- numeric $max_table_width
the maximum table width -- 0 fill the table to the right margin, null use the value as it is already set, non null > 0 is the maximum table width- Default Value: 0
- $align_data
- Default Value: 'C'
- int $header
0 no header, 1 has a header, 2 has a header and the header should repeat on a page break- Default Value: 1
- $align_header
- Default Value: 'L'
- int $ln
Indicates where the current position should go after the call. Possible values are:- 0: to the right
- 1: to the beginning of the next line [DEFAULT]
- 2: below
- Default Value: 1
SetAutoTableWidthStyle()
Set the alogorithm used to determine column widths
- Defined in textlayout/lib/I2CE_PDF.php on line 1061
- Signature: public function SetAutoTableWidthStyle($style)
- Parameters:
- string $style
Valid values are 'All', 'Header', and 'Explicit'
- string $style
SetFont()
Sets the font used to print character strings. It is mandatory to call this method at least once before printing text or the resulting document would not be valid. The font can be either a standard one or a font added via the AddFont() method. Standard fonts use Windows encoding cp1252 (Western Europe). The method can be called before the first page is created and the font is retained from page to page. If you just wish to change the current font size, it is simpler to call SetFontSize(). Note: for the standard fonts, the font metric files must be accessible. There are three possibilities for this:
- They are in the current directory (the one where the running script lies)
- They are in one of the directories defined by the include_path parameter
- They are in the directory defined by the FPDF_FONTPATH constant
Example for the last case (note the trailing slash):
define('FPDF_FONTPATH','/home/www/font/'); require('tcpdf.php'); //Times regular 12 $pdf->SetFont('Times'); //Arial bold 14 $pdf->SetFont('Arial','B',14); //Removes bold $pdf->SetFont(''); //Times bold, italic and underlined 14 $pdf->SetFont('Times','BIU');
If the file corresponding to the requested font is not found, the error "Could not include font metric file" is generated.
- Defined in textlayout/lib/I2CE_PDF.php on line 454
- Signature: public function SetFont($family,$style,$size)
- Parameters:
- string $family
Family font. It can be either a name defined by AddFont() or one of the standard families (case insensitive):- Courier (fixed-width)
- Helvetica or Arial (synonymous; sans serif)
- Times (serif)
- Symbol (symbolic)
- ZapfDingbats (symbolic)
- string $style
Font style. Possible values are (case insensitive):- empty string: regular
- B: bold
- I: italic
- U: underline
- Default Value:
- float $size
Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12 @since 1.0 @see AddFont(), SetFontSize(), Cell(), MultiCell(), Write()- Default Value: 0
- string $family
SetFontSize()
Defines the size of the current font.
- Defined in textlayout/lib/I2CE_PDF.php on line 589
- Signature: public function SetFontSize($size)
- Parameters:
- float $size
The size (in points) @since 1.0 @see SetFont()
- float $size
SetHyphenationDictionary()
set the hyphenation dictionary used for text tables
- Defined in textlayout/lib/I2CE_PDF.php on line 973
- Signature: public function SetHyphenationDictionary($hyphen)
- Parameters:
- I2CE_Hyphen $hyphen
SetLineSpacing()
Set the spacing between rows of the table
- Defined in textlayout/lib/I2CE_PDF.php on line 934
- Signature: public function SetLineSpacing($spacing)
- Parameters:
- numeric $spacing
number to multiply the text height by to get the spacing
- numeric $spacing
SetMaxTableWidth()
Set the maximum width of the table width
- Defined in textlayout/lib/I2CE_PDF.php on line 997
- Signature: public function SetMaxTableWidth($width)
- Parameters:
- numeric $width
in user units
- numeric $width
SetMinTableCellWidth()
Set the minimum cell width of the table
- Defined in textlayout/lib/I2CE_PDF.php on line 918
- Signature: public function SetMinTableCellWidth($width)
- Parameters:
- numeric $width
SetRunningHeader()
Set a running header for tables that span multiple pages
- Defined in textlayout/lib/I2CE_PDF.php on line 989
- Signature: public function SetRunningHeader($running_header)
- Parameters:
- boolean $running_header
true to repeat the header
- boolean $running_header
SetTableColSpacing()
Set the spacing between columns of the table
- Defined in textlayout/lib/I2CE_PDF.php on line 926
- Signature: public function SetTableColSpacing($spacing)
- Parameters:
- numeric $spacing
SetTableDataFillColor()
Set the data fill color for a table @param array of $int -- the rgb values
- Defined in textlayout/lib/I2CE_PDF.php on line 1116
- Signature: public function SetTableDataFillColor($color)
- Parameters:
- $color
SetTableDataTextColor()
Set the data text color for a table @param array of $int -- the rgb values
- Defined in textlayout/lib/I2CE_PDF.php on line 1127
- Signature: public function SetTableDataTextColor($color)
- Parameters:
- $color
SetTableFramingColor()
Set the framing color for a table @param array of $int -- the rgb values
- Defined in textlayout/lib/I2CE_PDF.php on line 1106
- Signature: public function SetTableFramingColor($color)
- Parameters:
- $color
SetTableHeaderFillColor()
Set the header of a table's fill color @param array of $int -- the rgb values
- Defined in textlayout/lib/I2CE_PDF.php on line 1088
- Signature: public function SetTableHeaderFillColor($color)
- Parameters:
- $color
SetTableHeaderTextColor()
Set the header of a table's text color @param array of $int -- the rgb values
- Defined in textlayout/lib/I2CE_PDF.php on line 1097
- Signature: public function SetTableHeaderTextColor($color)
- Parameters:
- $color
SetTableWitdths()
Set the widths of the columns used in the table explicitly @parma array of number $widths -- the column widths Note: setting table width will set the table width style to explicit
- Defined in textlayout/lib/I2CE_PDF.php on line 1070
- Signature: public function SetTableWitdths($widths)
- Parameters:
- $widths
SetWordWrapAlgorithm()
Set the alogorithm used to determine word-wrapping
- Defined in textlayout/lib/I2CE_PDF.php on line 1047
- Signature: public function SetWordWrapAlgorithm($algorithm)
- Parameters:
- String $algorithm
__construct()
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). @param I2CE_Encoding $enc charset encoding for all input strings
- Defined in textlayout/lib/I2CE_PDF.php on line 173
- Signature: public function __construct($encoding,$orientation,$unit,$format)
- Parameters:
- $encoding
- string $orientation
page orientation. Possible values are (case insensitive):- P or Portrait (default)
- L or Landscape
- Default Value: 'P'
- string $unit
User measure unit. Possible values are:- pt: point
- mm: millimeter (default)
- cm: centimeter
- in: inch
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.- Default Value: 'mm'
- 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).- 4A0
- 2A0
- A0
- A1
- A2
- A3
- A4 (default)
- A5
- A6
- A7
- A8
- A9
- A10
- B0
- B1
- B2
- B3
- B4
- B5
- B6
- B7
- B8
- B9
- B10
- C0
- C1
- C2
- C3
- C4
- C5
- C6
- C7
- C8
- C9
- C10
- RA0
- RA1
- RA2
- RA3
- RA4
- SRA0
- SRA1
- SRA2
- SRA3
- SRA4
- LETTER
- LEGAL
- EXECUTIVE
- FOLIO
- Default Value: 'A4'
_escapetext()
Format a text string @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 626
- Signature: public function _escapetext($s)
- Parameters:
- $s
_putfonts()
Adds fonts _putfonts @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 1601
- Signature: protected function _putfonts()
_puttruetypeembedded()
Adds unicode fonts.
Based on PDF Reference 1.3 (section 5) @access protected @author Nicola Asuni @since 1.52.0.TC005 (2005-01-05)
- Defined in textlayout/lib/I2CE_PDF.php on line 1488
- Signature: protected function _puttruetypeembedded($font)
- Parameters:
- $font
_textstring()
Format a text string @access protected
- Defined in textlayout/lib/I2CE_PDF.php on line 613
- Signature: protected function _textstring($s)
- Parameters:
- $s
addImageContent()
Add image content
- Defined in textlayout/lib/I2CE_PDF.php on line 194
- Signature: public function addImageContent($content,$reference_name)
- Parameters:
displayTextCell()
Puts in a wordwrapped text cell
- Defined in textlayout/lib/I2CE_PDF.php on line 753
- Signature: protected function displayTextCell($text_cell,$text)
- Parameters:
- I2CE_TextCell $text_cell
- string $text
getAdobeStandardEncoding()
Get the I2CE_Encoding according to one of the standard adobe encodings
- Defined in textlayout/lib/I2CE_PDF.php on line 1416
- Signature: protected function getAdobeStandardEncoding($encoding)
- Parameters:
- $encoding
getDescription()
Setup the array the required fields for the FontDescriptor entry The required fields are 'Ascent' 'Descent' 'CapHeight' 'Flags' 'FontBBox' 'ItalicAngle' 'StemV' 'MissingWidth'
- Defined in textlayout/lib/I2CE_PDF.php on line 271
- Signature: protected function getDescription($fm,$uses_adobe_standard_encoding)
- Parameters:
- $fm
- $uses_adobe_standard_encoding
getFontKey()
get the fontkey associated to a fmaily and style
- Defined in textlayout/lib/I2CE_PDF.php on line 231
- Signature: protected function getFontKey($family,$style,$modify_style)
- Parameters:
- Returns: string
loadGlyphList()
- Defined in textlayout/lib/I2CE_PDF.php on line 1463
- Signature: protected function loadGlyphList()
load_file()
- Defined in textlayout/lib/I2CE_PDF.php on line 1448
- Signature: protected function load_file($category,$file_name)
- Parameters:
- $category
- $file_name
setHeaderData()
Set header data. @param string $ln header image logo
- Defined in textlayout/lib/I2CE_PDF.php on line 946
- Signature: public function setHeaderData($logo,$lw,$ht,$hs,$hd)
- Parameters:
setHeaderMargin()
Set header margin. (minimum distance between header and top page margin)
- Defined in textlayout/lib/I2CE_PDF.php on line 642
- Signature: public function setHeaderMargin($hm)
- Parameters:
- int $hm
distance in user units- Default Value: 10
- int $hm
setHeaderWidth()
Sets header width
- Defined in textlayout/lib/I2CE_PDF.php on line 651
- Signature: public function setHeaderWidth($w)
- Parameters:
- int $w
width in user units. Value of 0 says to use all the avaiable width- Default Value: 0
- int $w
setPrintHeader()
Set a flag to print page header.
- Defined in textlayout/lib/I2CE_PDF.php on line 659
- Signature: public function setPrintHeader($val)
- Parameters:
- boolean $val
set to true to print the page header (default), false otherwise.- Default Value: true
- boolean $val