|
const | FONT = 'DejaVuSans' |
|
const | FONT_SIZE = 10 |
|
◆ __construct()
Main constructor, set creator and author
- Parameters
-
Preferences | $prefs | Preferences |
| ?PdfModel | $model Related model |
◆ __destruct()
Galette\IO\Pdf::__destruct |
( |
| ) |
|
◆ colorHex2Dec()
Galette\IO\Pdf::colorHex2Dec |
( |
string |
$hex6 | ) |
|
Converts color from HTML format #RRVVBB to RGB 3 colors array.
- Parameters
-
string | $hex6 | 7 chars string #RRVVBB |
- Returns
- array<string,float|int>
◆ cut()
Galette\IO\Pdf::cut |
( |
string |
$str, |
|
|
int |
$length |
|
) |
| |
|
protected |
Cut a string
- Parameters
-
string | $str | Original string |
integer | $length | Max length |
- Returns
- string
◆ download()
Galette\IO\Pdf::download |
( |
| ) |
|
◆ Error()
Galette\IO\Pdf::Error |
( |
mixed |
$msg | ) |
|
This method is automatically called in case of fatal error; it simply outputs the message and halts the execution. An inherited class may override it to customize the error handling but should always halt the script, or the resulting document would probably be invalid. 2004-06-11 :: Nicola Asuni : changed bold tag with strong 2007-07-21 :: John Perr : changed function to return error to session 2017-02-14 :: Johan Cwiklinski : use slim's flash message; do not rely on session for redirect
- Parameters
-
string | $msg | The error message |
- Returns
- void @access public
- Since
- 1.0
◆ fixSize()
Galette\IO\Pdf::fixSize |
( |
string |
$text, |
|
|
int |
$maxsize, |
|
|
int |
$fontsize, |
|
|
string |
$fontstyle = '' , |
|
|
string |
$fontname = null |
|
) |
| |
|
protected |
Fix text size
- Parameters
-
string | $text | Text content |
integer | $maxsize | Maximal size |
integer | $fontsize | Font size |
string | $fontstyle | Font style (defaults to '') |
| ?string | $fontname Font name (defaults to static::FONT) |
- Returns
- void
◆ Footer()
Galette\IO\Pdf::Footer |
( |
TCPDF |
$pdf = null | ) |
|
Draws PDF page footer
- Parameters
-
- Returns
- void
◆ getFilename()
Galette\IO\Pdf::getFilename |
( |
| ) |
|
◆ Header()
Galette\IO\Pdf::Header |
( |
| ) |
|
◆ init()
◆ modelPageHeader()
Galette\IO\Pdf::modelPageHeader |
( |
string |
$title = null | ) |
|
|
protected |
Draws models PDF page header
- Parameters
-
?string | $title Additional title to display just after logo |
- Returns
- void
◆ PageBody()
Galette\IO\Pdf::PageBody |
( |
| ) |
|
Draws body from model
- Returns
- void
◆ PageHeader()
Galette\IO\Pdf::PageHeader |
( |
string |
$title = null | ) |
|
Draws PDF page header
- Parameters
-
?string | $title Additional title to display just after logo |
- Returns
- void
◆ setNoFooter()
Galette\IO\Pdf::setNoFooter |
( |
| ) |
|
|
protected |
◆ setNoHeader()
Galette\IO\Pdf::setNoHeader |
( |
| ) |
|
|
protected |
◆ showPagination()
Galette\IO\Pdf::showPagination |
( |
| ) |
|
Set show pagination
- Returns
- void
◆ standardPageHeader()
Galette\IO\Pdf::standardPageHeader |
( |
string |
$title = null | ) |
|
|
protected |
Draws standard PDF page header
- Parameters
-
?string | $title Additional title to display just after logo |
- Returns
- void
◆ stretchHead()
Galette\IO\Pdf::stretchHead |
( |
string |
$str, |
|
|
int |
$length |
|
) |
| |
|
protected |
Stretch a header string
- Parameters
-
string | $str | Original string |
integer | $length | Max length |
- Returns
- string
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/galette-apidoc/checkouts/develop/galette/lib/Galette/IO/Pdf.php