pdf.inc
Interfaces, Classes, Traits and Enums
- PDFEntry
- Common interface for all PDF entries.
- PDFTable
- Represents a table for PDF export.
- PDFTableRow
- Represents a table row for PDF export.
- PDFTableCell
- Represents a table cell for PDF export.
- PDFLabelValue
- Simple PDF object to print label value entries.
- PDFImage
- Adds an image to the PDF file.
Table of Contents
- LAMPDF_FONT_SIZE = 7
- font size
- LAMPDF_FONT_SIZE_BIG = 10
- font size for bigger text
- LAMPDF_LABELWIDTH = 50
- width of a label
- LAMPDF_LINEHEIGHT = 5
- line height
- LAMPDF_LINEWIDTH = 190
- line width
- createModulePDF() : string
- This function creates the PDF output of one or more accounts.
- createPdf() : string
- This function creates the PDF output of one or more accounts using TCPDF.
- getSectionHeadline() : string
- Creates a section headline.
- printLabelValue() : mixed
- Prints a PDFLabelValue entry.
- printTable() : mixed
- Prints a PDFTable entry.
- printImage() : mixed
- Prints an image entry.
Constants
LAMPDF_FONT_SIZE
font size
public
mixed
LAMPDF_FONT_SIZE
= 7
LAMPDF_FONT_SIZE_BIG
font size for bigger text
public
mixed
LAMPDF_FONT_SIZE_BIG
= 10
LAMPDF_LABELWIDTH
width of a label
public
mixed
LAMPDF_LABELWIDTH
= 50
LAMPDF_LINEHEIGHT
line height
public
mixed
LAMPDF_LINEHEIGHT
= 5
LAMPDF_LINEWIDTH
line width
public
mixed
LAMPDF_LINEWIDTH
= 190
Functions
createModulePDF()
This function creates the PDF output of one or more accounts.
createModulePDF(array<string|int, mixed> $accounts, string $pdf_structure, string $font[, $returnAsString = false ]) : string
Parameters
- $accounts : array<string|int, mixed>
-
A numbered array containing all accounts the PDF page should be created for. The entries of the array must be AccountContainer objects.
- $pdf_structure : string
-
The filename of the structure definition that should be used to create the PDF page. If not submitted the 'default.user' structure definition for the appropriate account type.
- $font : string
-
font to use (e.g. DejaVu)
- $returnAsString : = false
-
returns the PDF output as String value instead of writing it to a file
Tags
Return values
string —PDF file name
createPdf()
This function creates the PDF output of one or more accounts using TCPDF.
createPdf(PDFstructure $structure, array<string|int, mixed> $accounts, mixed $pdfKeys, mixed $account_type, string $font, bool $returnAsString) : string
Parameters
- $structure : PDFstructure
-
PDF structure
- $accounts : array<string|int, mixed>
-
A numbered array containing all accounts the PDF page should be created for. The entries of the array must be AccountContainer objects.
- $pdfKeys : mixed
- $account_type : mixed
- $font : string
-
font to use
- $returnAsString : bool
-
returns the PDF output as String value instead of writing it to a file
Return values
string —PDF file name
getSectionHeadline()
Creates a section headline.
getSectionHeadline(PDFEntry $entry) : string
Parameters
- $entry : PDFEntry
-
content entry
Return values
string —headline
printLabelValue()
Prints a PDFLabelValue entry.
printLabelValue(LAMTCPDF &$pdf, PDFLabelValue $valueEntry, string $fontName) : mixed
Parameters
- $pdf : LAMTCPDF
-
PDF
- $valueEntry : PDFLabelValue
-
entry
- $fontName : string
-
font name
Return values
mixed —printTable()
Prints a PDFTable entry.
printTable(LAMTCPDF &$pdf, PDFTable $table, string $fontName) : mixed
Parameters
Return values
mixed —printImage()
Prints an image entry.
printImage(LAMTCPDF &$pdf, PDFImage $imageEntry, string $fontName) : mixed