XOOPS
2.6.0
|
Public Member Functions | |
__construct () | |
addHtml ($response, $html) | |
fetchPdf ($response) | |
getDescription () | |
getName () | |
outputPdfDownload ($response, $name) | |
outputPdfInline ($response, $name) | |
setAuthor ($response, $pdfAuthor) | |
setBaseFont ($response, $fontFamily, $fontStyle= '', $fontSize=null) | |
setBaseUnit ($response, $unit) | |
setDefaultMonospacedFont ($response, $monoFontFamily) | |
setKeywords ($response, $pdfKeywords) | |
setMargins ($response, $leftMargin, $topMargin, $rightMargin, $bottomMargin) | |
setPageOrientation ($response, $pageOrientation) | |
setPageSize ($response, $pageSize) | |
setSubject ($response, $pdfSubject) | |
setTitle ($response, $pdfTitle) | |
startPdf ($response) | |
Public Member Functions inherited from Xoops\Core\Service\AbstractContract | |
getDescription () | |
getMode () | |
getName () | |
getPriority () | |
setPriority ($priority) | |
Protected Member Functions | |
resetPdf () | |
Protected Attributes | |
$bottomMargin | |
$fontFamily | |
$fontSize | |
$fontStyle | |
$leftMargin | |
$moduleConfigs | |
$monoFontFamily | |
$pageOrientation = 'P' | |
$pageSize = 'A4' | |
$pdfAuthor | |
$pdfCreator | |
$pdfEngine | |
$pdfKeywords | |
$pdfSubject | |
$pdfTitle | |
$rightMargin | |
$topMargin | |
$unit = 'mm' | |
Protected Attributes inherited from Xoops\Core\Service\AbstractContract | |
$priority = Manager::PRIORITY_MEDIUM | |
Private Member Functions | |
decodeEntities ($text) | |
initPdf () | |
setFromConfigs ($name, $property, $default) | |
Private Attributes | |
$moddir = 'pdf' | |
Additional Inherited Members | |
Public Attributes inherited from Xoops\Core\Service\Contract\HtmlToPdfInterface | |
const | MODE = \Xoops\Core\Service\Manager::MODE_EXCLUSIVE |
Definition at line 26 of file HtmlToPdfProvider.php.
HtmlToPdfProvider::__construct | ( | ) |
__construct
Definition at line 88 of file HtmlToPdfProvider.php.
References resetPdf().
HtmlToPdfProvider::addHtml | ( | $response, | |
$html | |||
) |
addHtml - add HTML formatted text to document. This may be called multiple times
Response | $response | object |
string | $html | HTML formated text to include in document array user info, 'uid', 'uname' and 'email' required |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 361 of file HtmlToPdfProvider.php.
References $html, and initPdf().
|
private |
decodeEntities - handles numeric entities
string | $text | text to decode |
Definition at line 467 of file HtmlToPdfProvider.php.
References $text.
Referenced by setAuthor(), setSubject(), and setTitle().
HtmlToPdfProvider::fetchPdf | ( | $response | ) |
fetchPdf - fetch rendered document as a string
Response | $response | object |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 411 of file HtmlToPdfProvider.php.
References $response, and initPdf().
HtmlToPdfProvider::getDescription | ( | ) |
getDescription - get human readable description of the service provider
Definition at line 170 of file HtmlToPdfProvider.php.
HtmlToPdfProvider::getName | ( | ) |
getName - get a short name for this service provider. This should be unique within the scope of the named service, so using module dirname is suggested.
Definition at line 160 of file HtmlToPdfProvider.php.
|
private |
initPdf - initialize TCPDF with current setting
Definition at line 423 of file HtmlToPdfProvider.php.
Referenced by addHtml(), fetchPdf(), outputPdfDownload(), and outputPdfInline().
HtmlToPdfProvider::outputPdfDownload | ( | $response, | |
$name | |||
) |
outputPdfDownload - output a named pdf document file for download
Response | $response | object |
string | $name | filename for file |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 394 of file HtmlToPdfProvider.php.
References $name, and initPdf().
HtmlToPdfProvider::outputPdfInline | ( | $response, | |
$name | |||
) |
outputPdfInline - output a named pdf document file inline
Response | $response | object |
string | $name | filename for file |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 376 of file HtmlToPdfProvider.php.
References $name, and initPdf().
|
protected |
resetPdf - resets to default state
Definition at line 115 of file HtmlToPdfProvider.php.
References Xoops\getInstance(), and setFromConfigs().
Referenced by __construct(), and startPdf().
HtmlToPdfProvider::setAuthor | ( | $response, | |
$pdfAuthor | |||
) |
setAuthor - set author in pdf meta data
Response | $response | object |
string | $pdfAuthor | author name |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 294 of file HtmlToPdfProvider.php.
References $pdfAuthor, and decodeEntities().
HtmlToPdfProvider::setBaseFont | ( | $response, | |
$fontFamily, | |||
$fontStyle = '' , |
|||
$fontSize = null |
|||
) |
setBaseFont - set the base font used in rendering
Response | $response | object |
string | $fontFamily | font family |
string | $fontStyle | font style ('bold', 'italic', etc.) |
float | $fontSize | font size in points |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 260 of file HtmlToPdfProvider.php.
References $fontFamily, $fontSize, and $fontStyle.
HtmlToPdfProvider::setBaseUnit | ( | $response, | |
$unit | |||
) |
setBaseUnit - set unit of measure for page size, margins, etc.
Response | $response | object |
string | $unit | unit used in page size, margins. Possible values include 'mm' = millimeter, "in" = inches, 'pt' = typographic points |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 216 of file HtmlToPdfProvider.php.
References $unit.
HtmlToPdfProvider::setDefaultMonospacedFont | ( | $response, | |
$monoFontFamily | |||
) |
setDefaultMonospacedFont - default monotype font used in rendering
Response | $response | object |
string | $monoFontFamily | font family |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 278 of file HtmlToPdfProvider.php.
References $monoFontFamily.
|
private |
setFromConfigs - set property from config value or default
string | $name | config name |
string | $property | property name |
mixed | $default | default value |
Definition at line 102 of file HtmlToPdfProvider.php.
References $name.
Referenced by resetPdf().
HtmlToPdfProvider::setKeywords | ( | $response, | |
$pdfKeywords | |||
) |
setKeywords - set keywords in pdf meta data
Response | $response | object |
string[] | $pdfKeywords array of keywords pertaining to document |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 342 of file HtmlToPdfProvider.php.
References $pdfKeywords.
HtmlToPdfProvider::setMargins | ( | $response, | |
$leftMargin, | |||
$topMargin, | |||
$rightMargin, | |||
$bottomMargin | |||
) |
setMargins - set margin sizes
Response | $response | object |
float | $leftMargin | left margin in base units, |
float | $topMargin | top margin in base units |
float | $rightMargin | right margin in base units |
float | $bottomMargin | bottom margin in base units |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 235 of file HtmlToPdfProvider.php.
References $bottomMargin, $leftMargin, $rightMargin, and $topMargin.
HtmlToPdfProvider::setPageOrientation | ( | $response, | |
$pageOrientation | |||
) |
setPageOrientation - set page orientation
Response | $response | object |
string | $pageOrientation | page orientation, 'P' for portrait, 'L' for landscape |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 183 of file HtmlToPdfProvider.php.
References $pageOrientation.
HtmlToPdfProvider::setPageSize | ( | $response, | |
$pageSize | |||
) |
setPageSize - set standard page size
Response | $response | object |
string | $pageSize | standard named page size, i.e. 'LETTER', 'A4', etc. |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 199 of file HtmlToPdfProvider.php.
References $pageSize.
HtmlToPdfProvider::setSubject | ( | $response, | |
$pdfSubject | |||
) |
setSubject - set subject in pdf meta data
Response | $response | object |
string | $pdfSubject | document subject |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 326 of file HtmlToPdfProvider.php.
References $pdfSubject, and decodeEntities().
HtmlToPdfProvider::setTitle | ( | $response, | |
$pdfTitle | |||
) |
setTitle - set title in pdf meta data
Response | $response | object |
string | $pdfTitle | document title |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 310 of file HtmlToPdfProvider.php.
References $pdfTitle, and decodeEntities().
HtmlToPdfProvider::startPdf | ( | $response | ) |
startPdf - start a new pdf
Response | $response | object |
Implements Xoops\Core\Service\Contract\HtmlToPdfInterface.
Definition at line 149 of file HtmlToPdfProvider.php.
References resetPdf().
|
protected |
Definition at line 53 of file HtmlToPdfProvider.php.
Referenced by setMargins().
|
protected |
Definition at line 56 of file HtmlToPdfProvider.php.
Referenced by setBaseFont().
|
protected |
Definition at line 62 of file HtmlToPdfProvider.php.
Referenced by setBaseFont().
|
protected |
Definition at line 59 of file HtmlToPdfProvider.php.
Referenced by setBaseFont().
|
protected |
Definition at line 44 of file HtmlToPdfProvider.php.
Referenced by setMargins().
|
private |
Definition at line 29 of file HtmlToPdfProvider.php.
|
protected |
Definition at line 83 of file HtmlToPdfProvider.php.
|
protected |
Definition at line 65 of file HtmlToPdfProvider.php.
Referenced by setDefaultMonospacedFont().
|
protected |
Definition at line 35 of file HtmlToPdfProvider.php.
Referenced by setPageOrientation().
|
protected |
Definition at line 38 of file HtmlToPdfProvider.php.
Referenced by setPageSize().
|
protected |
Definition at line 68 of file HtmlToPdfProvider.php.
Referenced by setAuthor().
|
protected |
Definition at line 80 of file HtmlToPdfProvider.php.
|
protected |
Definition at line 32 of file HtmlToPdfProvider.php.
|
protected |
Definition at line 77 of file HtmlToPdfProvider.php.
Referenced by setKeywords().
|
protected |
Definition at line 74 of file HtmlToPdfProvider.php.
Referenced by setSubject().
|
protected |
Definition at line 71 of file HtmlToPdfProvider.php.
Referenced by setTitle().
|
protected |
Definition at line 50 of file HtmlToPdfProvider.php.
Referenced by setMargins().
|
protected |
Definition at line 47 of file HtmlToPdfProvider.php.
Referenced by setMargins().
|
protected |
Definition at line 41 of file HtmlToPdfProvider.php.
Referenced by setBaseUnit().