modules/Reports/sugarpdf/sugarpdf.summary.php
\ReportsSugarpdfSummary
- Parent(s)
- \ReportsSugarpdfReports < \Sugarpdf < \TCPDF
Constants
STRETCH_NONE
= 0
Stretch options constants
Inherited from: \Sugarpdf::STRETCH_NONE\ReportsSugarpdfReports::STRETCH_NONE- Inherited_from
- \Sugarpdf::STRETCH_NONE
- Inherited_from
- \ReportsSugarpdfReports::STRETCH_NONE
STRETCH_SCALE
= 1
- Inherited_from
- \Sugarpdf::STRETCH_SCALE
- Inherited_from
- \ReportsSugarpdfReports::STRETCH_SCALE
STRETCH_SCALE_FORCED
= 2
- Inherited_from
- \Sugarpdf::STRETCH_SCALE_FORCED
- Inherited_from
- \ReportsSugarpdfReports::STRETCH_SCALE_FORCED
STRETCH_SPACING
= 3
- Inherited_from
- \Sugarpdf::STRETCH_SPACING
- Inherited_from
- \ReportsSugarpdfReports::STRETCH_SPACING
STRETCH_SPACING_FORCED
= 4
- Inherited_from
- \Sugarpdf::STRETCH_SPACING_FORCED
- Inherited_from
- \ReportsSugarpdfReports::STRETCH_SPACING_FORCED
Properties
$aclAction= 'PDF_ACL_ACCESS'
Use for the ACL access.
Inherited from: \Sugarpdf::$$aclAction\ReportsSugarpdfReports::$$aclActionPDF_ACL_ACCESS
Details- Type
- n/a
- Inherited_from
- \Sugarpdf::$$aclAction
- Inherited_from
- \ReportsSugarpdfReports::$$aclAction
$action= ''''
The name of the current action.
Inherited from: \Sugarpdf::$$action\ReportsSugarpdfReports::$$action''
Details- Type
- n/a
- Inherited_from
- \Sugarpdf::$$action
- Inherited_from
- \ReportsSugarpdfReports::$$action
$bean= 'null'
null
Details- Type
- n/a
- Inherited_from
- \Sugarpdf::$$bean
- Inherited_from
- \ReportsSugarpdfReports::$$bean
$errors= 'array()'
Any errors that occured this can either be set by the view or the controller or the model
Inherited from: \Sugarpdf::$$errors\ReportsSugarpdfReports::$$errorsarray()
Details- Type
- n/a
- Inherited_from
- \Sugarpdf::$$errors
- Inherited_from
- \ReportsSugarpdfReports::$$errors
$fileName= 'PDF_FILENAME'
Use to set the filename of the output pdf file.
Inherited from: \Sugarpdf::$$fileName\ReportsSugarpdfReports::$$fileNamePDF_FILENAME
Details- Type
- n/a
- Inherited_from
- \Sugarpdf::$$fileName
- Inherited_from
- \ReportsSugarpdfReports::$$fileName
$module= ''''
The name of the current module.
Inherited from: \Sugarpdf::$$module\ReportsSugarpdfReports::$$module''
Details- Type
- n/a
- Inherited_from
- \Sugarpdf::$$module
- Inherited_from
- \ReportsSugarpdfReports::$$module
Array
$options= 'array(
"evencolor"=>"#DCDCDC",
"header"=>array("fill"=>"#4B4B4B", "fontStyle"=>"B", "textColor"=>"#FFFFFF"),
)'
Options array for the writeCellTable method of reports.
Inherited from: \ReportsSugarpdfReports::$$optionsarray(
"evencolor"=>"#DCDCDC",
"header"=>array("fill"=>"#4B4B4B", "fontStyle"=>"B", "textColor"=>"#FFFFFF"),
)
Details- Type
- Array
- Inherited_from
- \ReportsSugarpdfReports::$$options
$sugarpdf_object_map= 'array()'
This array is meant to hold an objects/data that we would like to pass between the controller and the view. The bean will automatically be set for us, but this is meant to hold anything else.
Inherited from: \Sugarpdf::$$sugarpdf_object_map\ReportsSugarpdfReports::$$sugarpdf_object_maparray()
Details- Type
- n/a
- Inherited_from
- \Sugarpdf::$$sugarpdf_object_map
- Inherited_from
- \ReportsSugarpdfReports::$$sugarpdf_object_map
Methods
Cell(
$w, $h
=
0, $txt
=
'', $border
=
0, $ln
=
0, $align
=
'', $fill
=
0, $link
=
'', $stretch
=
0
)
:
void
[OVERRIDE] Cell method in tcpdf library.
Inherited from: \Sugarpdf::Cell()\ReportsSugarpdfReports::Cell()Handle charset conversion and HTML entity decode. This method override the regular Cell() method to apply the prepare_string() function to the string to print in the PDF. The cell method is used by all the methods which print text (Write, MultiCell).
Name | Type | Description |
---|---|---|
$w | ||
$h | ||
$txt | ||
$border | ||
$ln | ||
$align | ||
$fill | ||
$link | ||
$stretch |
- See
- \include/tcpdf/TCPDF#Cell()
Header(
)
:
void
[OVERRIDE] This method override the regular Header() method to enable the custom image directory in addition to the OOB image directory.
Inherited from: \Sugarpdf::Header()\ReportsSugarpdfReports::Header()This method is used to render the page header. It is automatically called by AddPage().
- Access
- public
- See
- \include/tcpdf/TCPDF#Header()
Ln1(
)
:
void
This Ln1() method will always print a line break of one line height.
Inherited from: \Sugarpdf::Ln1()\ReportsSugarpdfReports::Ln1()The regular Ln() method print a line break which has the height of the last printed cell.
Output(
$name
=
'doc.pdf', $dest
=
'I'
)
:
void
Disable zlib output compression if we are downloading the PDF.
Inherited from: \Sugarpdf::Output()\ReportsSugarpdfReports::Output()Name | Type | Description |
---|---|---|
$name | ||
$dest |
- See
- \TCPDF::Output()
SetFont(
string $family, string $style
=
'', float $size
=
0, string $fontfile
=
''
)
:
void
[OVERRIDE] SetFont method in TCPDF Library This method override the regular SetFont() method to enable the custom font directory in addition to the OOB font directory.
Inherited from: \Sugarpdf::SetFont()\ReportsSugarpdfReports::SetFont()Name | Type | Description |
---|---|---|
$family | string | Family font. It can be either a name defined by AddFont() or one of the standard Type1 families (case insensitive):
It is also possible to pass an empty string. In that case, the current family is retained. |
$style | string | Font style. Possible values are (case insensitive):
or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats basic fonts or other fonts when not defined. |
$size | float | 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 |
$fontfile | string | The font definition file. By default, the name is built from the family and style, in lower case with no spaces. |
- Access
- public
- See
- \include/tcpdf/TCPDF#SetFont()
__construct(
$bean
=
null, $sugarpdf_object_map
=
array(), $orientation
=
PDF_PAGE_ORIENTATION, $unit
=
PDF_UNIT, $format
=
PDF_PAGE_FORMAT, $unicode
=
true, $encoding
=
'UTF-8', $diskcache
=
false
)
:
void
Constructor which will peform the setup.
Inherited from: \Sugarpdf::__construct()\ReportsSugarpdfReports::__construct()Name | Type | Description |
---|---|---|
$bean | ||
$sugarpdf_object_map | ||
$orientation | ||
$unit | ||
$format | ||
$unicode | ||
$encoding | ||
$diskcache |
displayErrors(
)
:
void
This method will display the errors on the page.
Inherited from: \Sugarpdf::displayErrors()\ReportsSugarpdfReports::displayErrors()getLineHeightFromArray(
\$line $line, \$width $width
)
:
\The
Return the heigth of a line depending of the width, the font and the content
Inherited from: \Sugarpdf::getLineHeightFromArray()\ReportsSugarpdfReports::getLineHeightFromArray()Name | Type | Description |
---|---|---|
$line | \$line | Array containing the data of all the cells of the line |
$width | \$width | Array containing the width of all the cells of the line |
Type | Description |
---|---|
\The | heigth of the line |
getNumLines(
string $txt, float $w
=
0
)
:
int
This is method is fix for a better handling of the count. This method now handle the line break between words.
Inherited from: \Sugarpdf::getNumLines()\ReportsSugarpdfReports::getNumLines()This method returns the estimated number of lines required to print the text.
Name | Type | Description |
---|---|---|
$txt | string | text to print |
$w | float | width of cell. If 0, they extend up to the right margin of the page. |
Type | Description |
---|---|
int | Return the estimated number of lines. |
- Access
- public
- OVERRIDE
- Since
- 4.5.011
initOptionsForWriteCellTable(
\$options $options, \$item $item
)
:
\$options
Private method for writeCellTable which format and initialize the options array.
Inherited from: \Sugarpdf::initOptionsForWriteCellTable()\ReportsSugarpdfReports::initOptionsForWriteCellTable()Name | Type | Description |
---|---|---|
$options | \$options | array |
$item | \$item | array |
Type | Description |
---|---|
\$options | array |
preDisplay(
)
:
void
[OVERRIDE] - This method is meant to overidden in a subclass. The purpose of this method is to allow a view to do some preprocessing before the display method is called. This becomes useful when you have a view defined at the application level and then within a module have a sub-view that extends from this application level view. The application level view can do the setup in preDisplay() that is common to itself and any subviews and then the subview can just override display(). If it so desires, can also override preDisplay().
Inherited from: \ReportsSugarpdfReports::preDisplay()process(
)
:
void
This method will be called from the controller and is not meant to be overridden.
Inherited from: \Sugarpdf::process()\ReportsSugarpdfReports::process()wrap(
$tag, $value, $options
)
:
\the
return the HTML code of the value wrap with the tag $tag. This method handle options (general and specific)
Inherited from: \Sugarpdf::wrap()\ReportsSugarpdfReports::wrap()Name | Type | Description |
---|---|---|
$tag | ||
$value | ||
$options |
Type | Description |
---|---|
\the | HTML wrapped code |
writeCellTable(
\$item $item, \$options $options
=
NULL
)
:
void
This method allow printing a table using the MultiCell method with a formatted options array in parameter Options : header options override the regular options for the header's cells - $options['header'] cell options override the regular options for the specific cell - Array[line number (0 to x)][cell header]['options']
Inherited from: \Sugarpdf::writeCellTable()\ReportsSugarpdfReports::writeCellTable()Name | Type | Description |
---|---|---|
$item | \$item | Array[line number (0 to x)][cell header] = Cell content OR Array[line number (0 to x)][cell header]['value'] = Cell content AND Array[line number (0 to x)][cell header]['options'] = Array[cell properties] = values |
$options | \$options | Array which can contain : width (array 'column name'=>'width value + % OR nothing'), isheader (bool), header (array), fill (string: HTML color), ishtml (bool) default: false, border (0: no border (defaul), 1: frame or all of the following characters: L ,T ,R ,B), align (L: left align, C: center, R: right align, J: justification), stretch (array 'column name'=>stretch type) |
- See
- \MultiCell()
writeHTMLTable(
\$item $item, \$returnHtml $returnHtml
=
false, \$options $options
=
NULL
)
:
\the
This method allow printing a table using the writeHTML method with a formatted array in parameter This method can also return the table as HTML code
Inherited from: \Sugarpdf::writeHTMLTable()\ReportsSugarpdfReports::writeHTMLTable()Name | Type | Description |
---|---|---|
$item | \$item | Array[line number (0 to x)][cell header] = Cell content OR Array[line number (0 to x)][cell header]['value'] = Cell content AND Array[line number (0 to x)][cell header]['options'] = Array[cell properties] = values |
$returnHtml | \$returnHtml | (bool) Return the table as HTML code instead of printing the HTML table |
$options | \$options | Array which can contain : table (array of "HTML proprty"=>"value"),td (array of "HTML proprty"=>"value"), tr (array of "HTML proprty"=>"value"), isheader(bool), header (array of "HTML proprty"=>"value"), width (array 'column name'=>'width value + unit OR nothing') |
Type | Description |
---|---|
\the | HTML code if $returnHtml set to true |