lib/pdfstruct.inc
Properties
Description
Functions to manage the PDF structures.Functions
getPDFStructureDefinitions( string $scope = "user", string $profile = null, ) : array
Description
This function will return all available PDF structure definitions for the submitted account scope.Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $scope | string | The account scope the PDF structure definitions should be returned. |
"user" |
| $profile | string | server profile name |
null |
Return value
| Type | Description |
|---|---|
| array | $scope All available PDF structure definitions for the submitted account scope. Each entry is a string being the filename that may be passed to the createModulePDF() function as second argument. |
loadPDFStructureDefinitions( string $scope = 'user', string $pdf_structure = 'default', ) : array
Description
This function is used to get pdf structure from xml file.Used in createModulePDF.
Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $scope | string | The account scope for wich the PDF structure should be returned. |
'user' |
| $pdf_structure | string | Structure name of selected scope wich should be returned. |
'default' |
Return value
| Type | Description |
|---|---|
| array | PDF structure |
savePDFStructureDefinitions( string $scope, string $definition, ) : string
Description
Saves PDF structure definitions to XML file in format:Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $scope | string | account type |
|
| $definition | string | Name of definition |
Return value
| Type | Description |
|---|---|
| string | "no perms" if access denied or "ok". |
deletePDFStructureDefinition( string $scope, string $definition, ) : boolean
Description
Deletes XML file with PDF structure definitions.Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $scope | string | account type |
|
| $definition | string | Name of definition to delete |
Return value
| Type | Description |
|---|---|
| boolean | True if file was deleted or false if a problem occured. |
getAvailableLogos( ) : array
Description
This function returns an array with all aviliable logo images.Return value
| Type | Description |
|---|---|
| array | list of logo files |
copyPdfProfiles( array $pdfProfiles, String $scope, array $dests = array(), ) : boolean
Description
Copies PDF profiles to other server profiles.Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $pdfProfiles | array | PDF profile names |
|
| $scope | String | account scope |
|
| $dests | array | destinations |
array() |
Return value
| Type | Description |
|---|---|
| boolean | operation succeeded |
uploadPDFLogo( String $file, String $name, ) : \StatusMessage
Description
Uploads a PDF logo file for the current server profile.Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| $file | String | full path of temporary file |
|
| $name | String | file name |
Return value
| Type | Description |
|---|---|
| \StatusMessage | status message to display |
