Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
Public Member Functions | |
get_export_fontlist () | |
Get font list from config. | |
get_font_families () | |
Returns list of font families and types of fonts. | |
getTemplateSize ($tpl, $width=null, $height=null) | |
Get the size of an imported page. | |
is_core_font_family ($fontfamily) | |
Is this font family one of core fonts? | |
Output ($name='doc.pdf', $dest='I') | |
Send the document to a given destination: string, local file or browser. | |
useImportedPage ($pageId, $x=0, $y=0, $width=null, $height=null, $adjustPageSize=false) | |
Draws an imported page onto the page. | |
useTemplate ($tpl, $x=0, $y=0, $width=null, $height=null, $adjustPageSize=false) | |
Draws an imported page onto the page or another template. | |
Public Attributes | |
useImportedPage as | fpdiUseImportedPage |
const | VERSION = '2.6.0' |
FPDI version. | |
Protected Member Functions | |
_enddoc () | |
_getxobjectdict () | |
_newobj ($objid='') | |
Begin a new object and return the object number. | |
_put ($s, $newLine=true) | |
Append content to the buffer of TCPDF. | |
_putxobjects () | |
adjustLastLink ($externalLink, $xPt, $scaleX, $yPt, $newHeightPt, $scaleY, $importedPage) | |
This method will add additional data to the last created link/annotation. | |
getNextTemplateId () | |
Get the next template id. | |
writePdfType (PdfType $value) | |
Writes a PdfType object to the resulting buffer. | |
Protected Attributes | |
int null | $currentObjectNumber |
The currently used object number. | |
int | $templateId = 0 |
A counter for template ids. | |
Class Fpdi.
This class let you import pages of existing PDF documents into a reusable structure for FPDF.
This class let you import pages of existing PDF documents into a reusable structure for TCPDF.
@method _encrypt_data(int $n, string $s) string
This class let you import pages of existing PDF documents into a reusable structure for tFPDF.
|
protected |
string |
|
protected |
Begin a new object and return the object number.
int | string | $objid | Object ID (leave empty to get a new ID). |
int | object number |
|
protected |
Append content to the buffer of TCPDF.
string | $s | |
bool | $newLine |
|
protected |
CrossReferenceException | |
PdfParserException |
|
protected |
This method will add additional data to the last created link/annotation.
It will copy styling properties (supported by TCPDF) of the imported link.
array | $externalLink | |
float | int | $xPt | |
float | int | $scaleX | |
float | int | $yPt | |
float | int | $newHeightPt | |
float | int | $scaleY | |
array | $importedPage |
void |
|
inherited |
Get font list from config.
array|string[] |
|
inherited |
Returns list of font families and types of fonts.
array | multidimensional array with font families as keys and B, I, BI and N as values. |
|
protected |
Get the next template id.
int |
Fpdi::getTemplateSize | ( | $tpl, | |
$width = null, | |||
$height = null ) |
Get the size of an imported page.
Give only one of the size parameters (width, height) to calculate the other one automatically in view to the aspect ratio.
mixed | $tpl | The template id |
float | int | null | $width | The width. |
float | int | null | $height | The height. |
array|bool | An array with following keys: width, height, 0 (=width), 1 (=height), orientation (L or P) |
|
inherited |
Is this font family one of core fonts?
string | $fontfamily |
bool |
|
inherited |
Send the document to a given destination: string, local file or browser.
In the last case, the plug-in may be used (if present) or a download ("Save as" dialog box) may be forced.
The method first calls Close() if necessary to terminate the document.
$name | (string) The name of the file when saved. Note that special characters are removed and blanks characters are replaced with the underscore character. |
$dest | (string) Destination where to send the document. It can take one of the following values:
|
Fpdi::useImportedPage | ( | $pageId, | |
$x = 0, | |||
$y = 0, | |||
$width = null, | |||
$height = null, | |||
$adjustPageSize = false ) |
Draws an imported page onto the page.
Give only one of the size parameters (width, height) to calculate the other one automatically in view to the aspect ratio.
mixed | $pageId | The page id |
float | int | array | $x | The abscissa of upper-left corner. Alternatively you could use an assoc array with the keys "x", "y", "width", "height", "adjustPageSize". |
float | int | $y | The ordinate of upper-left corner. |
float | int | null | $width | The width. |
float | int | null | $height | The height. |
bool | $adjustPageSize |
array | The size. |
Fpdi::useTemplate | ( | $tpl, | |
$x = 0, | |||
$y = 0, | |||
$width = null, | |||
$height = null, | |||
$adjustPageSize = false ) |
Draws an imported page onto the page or another template.
Give only one of the size parameters (width, height) to calculate the other one automatically in view to the aspect ratio.
mixed | $tpl | The template id |
float | int | array | $x | The abscissa of upper-left corner. Alternatively you could use an assoc array with the keys "x", "y", "width", "height", "adjustPageSize". |
float | int | $y | The ordinate of upper-left corner. |
float | int | null | $width | The width. |
float | int | null | $height | The height. |
bool | $adjustPageSize |
array | The size |
|
protected |
Writes a PdfType object to the resulting buffer.
PdfType | $value |
PdfTypeException |
const Fpdi::VERSION = '2.6.0' |
FPDI version.
@string