lib/pdf.inc
Properties
Description
LDAP Account Manager PDF printing library. It consists of lamPDF class, the createModulePDF() function that may be called by other pages and furthermore some helper functions.Functions
createModulePDF( array $accounts, string $pdf_structure = "default", $returnAsString = false, ) : String
Description
This function creates the PDF output of one or more accounts.Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $accounts | array | 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. |
"default" |
| $returnAsString | n/a | returns the PDF output as String value instead of writing it to a file |
false |
Return value
| Type | Description |
|---|---|
| String | PDF file name |
getSectionHeadline( string $line, ) : string
Description
Creates a section headline.Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $line | string | section name |
Return value
| Type | Description |
|---|---|
| string | XML code for headline |
processLine( string $line, boolean $first_td = true, String $fontName, ) : array
Description
Creates the XML code for an PDF entry.Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $line | string | XML code of PDF entry |
|
| $first_td | boolean | True if this is the first column |
true |
| $fontName | String | font name |
Return value
| Type | Description |
|---|---|
| array | XML codes |
processFormatTags( string $line, string $style, ) : array
Description
Formats the XML code.Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $line | string | XML code of PDF entry |
|
| $style | string | style commands |
Return value
| Type | Description |
|---|---|
| array | XML code |
processAttributes( string $attrs, array $return = array(), ) : array
Description
Processes width, height and alignment attributes.Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $attrs | string | attributes |
|
| $return | array | XML code |
array() |
Return value
| Type | Description |
|---|---|
| array | XML code |
