LDAP Account Manager

PDF

Interfaces, Classes, Traits and Enums

PDFEntry
Common interface for all PDF entries.
PdfStructurePersistenceStrategy
Interface for PDF structure persistence.
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.
PdfStructurePersistenceManager
Manages the persistence of PDF structures.
PdfLogo
Logo for PDF structures.
PdfStructurePersistenceStrategyFiles
Manages PDF structures on file system.
PdfStructurePersistenceStrategyPdo
Manages PDF structures on file system.
PDFStructureReader
Reads a PDF structure.
PDFStructureWriter
Writes PDF structures to files.
PDFStructure
PDF structure
PDFTextSection
Section for static text.
PDFEntrySection
PDF section that contains LDAP data entries.
PDFSectionEntry
Single PDF entry.

Table of Contents

GLOBAL_PROFILE  = '__GLOBAL__'
Use as server profile name to manage global templates.
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.
addPageHeader()  : void
Adds the page header.
changeFont()  : void
Changes the current font in the PDF.
getSectionHeadline()  : string
Creates a section headline.
printLabelValue()  : void
Prints a PDFLabelValue entry.
printTable()  : void
Prints a PDFTable entry.
printImage()  : void
Prints an image entry.
getYWithoutOverflow()  : float
Returns the y-position to use for new cells
replaceSpecialCharacters()  : string
Replaces special characters that cannot be printed in PDF.
getPdfFonts()  : array<string, string>
Returns a list of possible fonts.

Constants

GLOBAL_PROFILE

Use as server profile name to manage global templates.

public mixed GLOBAL_PROFILE = '__GLOBAL__'

Functions

createModulePDF()

This function creates the PDF output of one or more accounts.

createModulePDF(array<string|int, accountContainer$accounts, string $pdf_structure, string $font[, bool $returnAsString = false ]) : string
Parameters
$accounts : array<string|int, accountContainer>

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 : bool = false

returns the PDF output as String value instead of writing it to a file

Tags
throws
LAMException

error creating PDF

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, accountContainer$accounts, array<string|int, string> $pdfKeys, ConfiguredType $account_type, string $font, bool $returnAsString) : string
Parameters
$structure : PDFStructure

PDF structure

$accounts : array<string|int, accountContainer>

A numbered array containing all accounts for the PDF page. The entries of the array must be AccountContainer objects.

$pdfKeys : array<string|int, string>

list of elements in PDF

$account_type : ConfiguredType

account type

$font : string

font to use

$returnAsString : bool

returns the PDF output as a string value instead of writing it to a file

Return values
string

PDF file name

addPageHeader()

Adds the page header.

addPageHeader(Tcpdf $pdf, PDFStructure $structure, string $fontName, array<string, string|int|bool> $pageData, int &$extraTopMargin) : void
Parameters
$pdf : Tcpdf

PDF object

$structure : PDFStructure

PDF structure

$fontName : string

font name

$pageData : array<string, string|int|bool>

page data

$extraTopMargin : int

y-position on PDF page

Return values
void

changeFont()

Changes the current font in the PDF.

changeFont(Tcpdf $pdf, string $fontName[, float $fontSize = LAMPDF_FONT_SIZE ][, string $style = '' ]) : void
Parameters
$pdf : Tcpdf

PDF

$fontName : string

font name

$fontSize : float = LAMPDF_FONT_SIZE

size

$style : string = ''

style (e.g. 'B')

Return values
void

getSectionHeadline()

Creates a section headline.

getSectionHeadline(PDFEntry $entry) : string
Parameters
$entry : PDFEntry

content entry

Return values
string

headline

printLabelValue()

Prints a PDFLabelValue entry.

printLabelValue(Tcpdf $pdf, PDFLabelValue $valueEntry, string $fontName, int $extraTopMargin) : void
Parameters
$pdf : Tcpdf

PDF

$valueEntry : PDFLabelValue

entry

$fontName : string

font name

$extraTopMargin : int

extra top margin

Return values
void

printTable()

Prints a PDFTable entry.

printTable(Tcpdf $pdf, PDFTable $table, string $fontName) : void
Parameters
$pdf : Tcpdf

PDF

$table : PDFTable

entry

$fontName : string

font name

Return values
void

printImage()

Prints an image entry.

printImage(Tcpdf $pdf, PDFImage $imageEntry, array<string, string|int|bool> $pageData) : void
Parameters
$pdf : Tcpdf

PDF

$imageEntry : PDFImage

entry

$pageData : array<string, string|int|bool>

page data

Return values
void

getYWithoutOverflow()

Returns the y-position to use for new cells

getYWithoutOverflow(float|int $posY, Tcpdf $pdf) : float
Parameters
$posY : float|int

calculated y-position of cell

$pdf : Tcpdf
Return values
float

position to use

replaceSpecialCharacters()

Replaces special characters that cannot be printed in PDF.

replaceSpecialCharacters(string|null $text) : string

Can be removed once tc-lib-pdf is used.

Parameters
$text : string|null

input text

Return values
string

output text

getPdfFonts()

Returns a list of possible fonts.

getPdfFonts() : array<string, string>
Return values
array<string, string>

list of fonts (description => font name)

Search results