|
Stud.IP
2.4 Revision 48548
|


Public Member Functions | |
| __construct ($orientation= 'P', $unit= 'mm', $format= 'A4', $unicode=false, $encoding= 'ISO-8859-1') | |
| addPage ($orientation= '', $format= '', $keepmargins=false, $tocpage=false) | |
| addContent ($content) | |
| addEndnote ($commented_by, $text) | |
| dispatch ($filename) | |
| save ($filename, $folder_id=null) | |
| setHeaderTitle ($title) | |
| setHeaderSubtitle ($subtitle) | |
| setHeaderData ($ln= '', $lw=0, $ht= '', $hs= '') | |
| writeHTML ($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align= '') | |
Public Member Functions inherited from ExportDocument | |
| addPage () | |
Protected Member Functions | |
| convertURL ($url) | |
| getDomains () | |
Static Protected Attributes | |
| static | $countEndnote = 0 |
Class to create an PDF by putting in Stud.IP-formatted code. Usage:
$doc = new ExportPDF(); $doc->addPage(); $doc->addContent('Hallo, %wir%% benutzen :studip:-Formatierung.'); $doc->dispatch("test_pdf"); //lines following dispatch won't be accessed anymor, because dispatch //cancels all other output.
| __construct | ( | $orientation = 'P', |
|
$unit = 'mm', |
|||
$format = 'A4', |
|||
$unicode = false, |
|||
$encoding = 'ISO-8859-1' |
|||
| ) |
Create a basic document (without any content so far).
| string | $orientation | page orientation. Possible values are (case insensitive):
|
| string | $unit | User measure unit. Possible values are:
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit. |
| mixed | $format | The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). |
| boolean | $unicode | TRUE means that the input text is unicode (default = false) |
| String | $encoding | charset encoding; default is ISO-8859-1 |

| addContent | ( | $content | ) |
Adding Stud.IP formatted code to the current page of the pdf. Remember to call addPage first.
| string | $content | Stud.IP formatted code |
Implements ExportDocument.

| addEndnote | ( | $commented_by, | |
| $text | |||
| ) |
| <type> | $commented_by |
| <type> | $text |
Adding a new page to the document. This page can contain even more content than for just one page. The pagebreak will be managed by tcpdf. But this function will create a new pagebreak. Needs to be called at least once to addContent.
| string | $orientation | page orientation. Possible values are (case insensitive):
|
| mixed | $format | The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat(). |
| boolean | $keepmargins | if true overwrites the default page margins with the current margins |
| boolean | $tocpage | if true set the tocpage state to true (the added page will be used to display Table Of Content). |
|
protected |
Converts URLs in images so that the webserver can access them without proxy.
| string | $url | of an image |

| dispatch | ( | $filename | ) |
Dispatches the PDF to the user and cancels all other output of Stud.IP.
| string | $filename | name of the future file without the extension. |
Implements ExportDocument.
|
protected |
finds an array with all domains of this Stud.IP and stores it in $this->domains

| save | ( | $filename, | |
$folder_id = null |
|||
| ) |
Saves the content as a file in the filesystem and returns a Stud.IP-document object.
| string | $filename | name of the future file without the extension. |
| mixed | $folder_id | md5-id of a given folder in database or null for nothing |
Implements ExportDocument.

| setHeaderData | ( | $ln = '', |
|
$lw = 0, |
|||
$ht = '', |
|||
$hs = '' |
|||
| ) |
Creates a header for each page with a custom logo defined
| string | $ln | header image logo |
| int | $lw | header image logo width in mm |
| string | $ht | string to print as title on document header |
| string | $hs | string to print on document header |


| setHeaderSubtitle | ( | $subtitle | ) |
Sets the subtitle of the header of each page.
| string | $subtitle | subtitle of the head |

| setHeaderTitle | ( | $title | ) |
Sets the title of the header of each page.
| string | $title | title of the head |

Overrides writeHTML-method of tcpdf to convert image-urls, so that they aren't accessed via proxy but directly.
| string | $html | text to display |
| boolean | $ln | if true add a new line after text (default = true) |
| boolean | $fill | Indicates if the background must be painted (true) or transparent (false). |
| boolean | $reseth | if true reset the last cell height (default false). |
| boolean | $cell | if true add the current left (or right for RTL) padding to each Write (default false). |
| string | $align | Allows to center or align the text. Possible values are:
|

|
staticprotected |