Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Namespaces | |
namespace | setasign\Fpdi |
| |
namespace | setasign\Fpdi\Math |
| |
namespace | setasign\Fpdi\PdfParser |
| |
namespace | setasign\Fpdi\PdfParser\CrossReference |
| |
namespace | setasign\Fpdi\PdfParser\Filter |
| |
namespace | setasign\Fpdi\PdfParser\Type |
| |
namespace | setasign\Fpdi\PdfReader |
| |
namespace | setasign\Fpdi\PdfReader\DataStructure |
| |
namespace | setasign\Fpdi\Tcpdf |
| |
namespace | setasign\Fpdi\Tfpdf |
| |
Classes | |
class | AbstractReader |
Abstract class for cross-reference reader classes. More... | |
class | Ascii85 |
Class for handling ASCII base-85 encoded data. More... | |
class | Ascii85Exception |
Exception for Ascii85 filter class. More... | |
class | AsciiHex |
Class for handling ASCII hexadecimal encoded data. More... | |
class | CrossReference |
Class CrossReference. More... | |
class | CrossReferenceException |
Exception used by the CrossReference and Reader classes. More... | |
class | FilterException |
Exception for filters. More... | |
interface | FilterInterface |
Interface for filters. More... | |
class | FixedReader |
Class FixedReader. More... | |
class | Flate |
Class for handling zlib/deflate encoded data. More... | |
class | FlateException |
Exception for flate filter class. More... | |
class | FpdfTpl |
Class FpdfTpl. More... | |
class | Fpdi |
Class Fpdi. More... | |
class | FpdiException |
Base exception class for the FPDI package. More... | |
class | GraphicsState |
A simple graphic state class which holds the current transformation matrix. More... | |
class | LineReader |
Class LineReader. More... | |
class | Lzw |
Class for handling LZW encoded data. More... | |
class | LzwException |
Exception for LZW filter class. More... | |
class | Matrix |
A simple 2D-Matrix class. More... | |
class | Page |
Class representing a page of a PDF document. More... | |
class | PageBoundaries |
An abstract class for page boundary constants and some helper methods. More... | |
class | PdfArray |
class | PdfBoolean |
Class representing a boolean PDF object. More... | |
class | PdfDictionary |
Class representing a PDF dictionary object. More... | |
class | PdfHexString |
Class representing a hexadecimal encoded PDF string object. More... | |
class | PdfIndirectObject |
Class representing an indirect object. More... | |
class | PdfIndirectObjectReference |
Class representing an indirect object reference. More... | |
class | PdfName |
Class representing a PDF name object. More... | |
class | PdfNull |
Class representing a PDF null object. More... | |
class | PdfNumeric |
Class representing a numeric PDF object. More... | |
class | PdfParser |
A PDF parser class. More... | |
class | PdfParserException |
Exception for the pdf parser class. More... | |
class | PdfReader |
A PDF reader class. More... | |
class | PdfReaderException |
Exception for the pdf reader class. More... | |
class | PdfStream |
Class representing a PDF stream object. More... | |
class | PdfString |
Class representing a PDF string object. More... | |
class | PdfToken |
Class representing PDF token object. More... | |
class | PdfType |
A class defining a PDF data type. More... | |
class | PdfTypeException |
Exception class for pdf type classes. More... | |
interface | ReaderInterface |
ReaderInterface for cross-reference readers. More... | |
class | Rectangle |
Class representing a rectangle. More... | |
class | StreamReader |
A stream reader class. More... | |
class | TcpdfFpdi |
Class TcpdfFpdi. More... | |
class | Tokenizer |
A tokenizer class. More... | |
class | Vector |
A simple 2D-Vector class. More... | |
Functions | |
_out ($s) | |
_putimages () | |
_putxobjectdict () | |
AddPage ($orientation='', $size='', $rotation=0) | |
adjustLastLink ($externalLink, $xPt, $scaleX, $yPt, $newHeightPt, $scaleY, $importedPage) | |
This method will add additional data to the last created link/annotation. | |
beginTemplate ($width=null, $height=null, $groupXObject=false) | |
Begins a new template. | |
cleanUp ($allReaders=false) | |
Release resources and file handles. | |
endTemplate () | |
Ends a template. | |
getImportedPageSize ($tpl, $width=null, $height=null) | |
Get the size of an imported page. | |
getNextTemplateId () | |
Get the next template id. | |
getPdfParserInstance (StreamReader $streamReader, array $parserParams=[]) | |
@noinspection PhpUndefinedClassInspection | |
getPdfReader ($id) | |
Get a pdf reader instance by its id. | |
getPdfReaderId ($file, array $parserParams=[]) | |
Get an unique reader id by the $file parameter. | |
getTemplateSize ($tpl, $width=null, $height=null) | |
Get the size of a template. | |
importPage ( $pageNumber, $box=PageBoundaries::CROP_BOX, $groupXObject=true, $importExternalLinks=false) | |
Imports a page. | |
Link ($x, $y, $w, $h, $link) | |
SetDrawColor ($r, $g=null, $b=null) | |
SetFillColor ($r, $g=null, $b=null) | |
SetFont ($family, $style='', $size=0) | |
SetFontSize ($size) | |
SetLineWidth ($width) | |
SetLink ($link, $y=0, $page=-1) | |
setMinPdfVersion ($pdfVersion) | |
Set the minimal PDF version. | |
setPageFormat ($size, $orientation) | |
Set the page format of the current page. | |
setSourceFile ($file) | |
Set the source PDF file. | |
setSourceFileWithParserParams ($file, array $parserParams=[]) | |
Set the source PDF file with parameters which are passed to the parser instance. | |
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 a template onto the page or another template. | |
writePdfType (PdfType $value) | |
Writes a PdfType object to the resulting buffer. | |
Variables | |
array | $createdReaders = [] |
Instances created internally. | |
string null | $currentReaderId |
The current reader id. | |
null int | $currentTemplateId |
The template id for the currently created template. | |
array | $importedPages = [] |
Data of all imported pages. | |
array | $objectMap = [] |
A map from object numbers of imported objects to new assigned object numbers by FPDF. | |
array | $objectsToCopy = [] |
An array with information about objects, which needs to be copied to the resulting document. | |
int | $templateId = 0 |
A counter for template ids. | |
trait | FpdfTplTrait |
Trait FpdfTplTrait. | |
trait | FpdiTrait |
The FpdiTrait. | |
|
protected |
This method will add additional data to the last created link/annotation.
It is separated because TCPDF uses its own logic to handle link annotations. This method is overwritten in the TCPDF implementation.
array | $externalLink | |
float | int | $xPt | |
float | int | $scaleX | |
float | int | $yPt | |
float | int | $newHeightPt | |
float | int | $scaleY | |
array | $importedPage |
void |
beginTemplate | ( | $width = null, | |
$height = null, | |||
$groupXObject = false ) |
Begins a new template.
float | int | null | $width | The width of the template. If null, the current page width is used. |
float | int | null | $height | The height of the template. If null, the current page height is used. |
bool | $groupXObject | Define the form XObject as a group XObject to support transparency (if used). |
int | A template identifier. |
cleanUp | ( | $allReaders = false | ) |
Release resources and file handles.
This method is called internally when the document is created successfully. By default it only cleans up stream reader instances which were created internally.
bool | $allReaders |
endTemplate | ( | ) |
Ends a template.
bool|int|null | A template identifier. |
getImportedPageSize | ( | $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) |
|
protected |
Get the next template id.
int |
|
protected |
@noinspection PhpUndefinedClassInspection
Get a new pdf parser instance.
StreamReader | $streamReader | |
array | $parserParams | Individual parameters passed to the parser instance. |
PdfParser|FpdiPdfParser |
|
protected |
|
protected |
Get an unique reader id by the $file parameter.
string | resource | PdfReader | StreamReader | $file | An open file descriptor, a path to a file, a PdfReader instance or a StreamReader instance. |
array | $parserParams | Individual parameters passed to the parser instance. |
string |
getTemplateSize | ( | $tpl, | |
$width = null, | |||
$height = null ) |
Get the size of a 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 | 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) |
importPage | ( | $pageNumber, | |
$box = PageBoundaries::CROP_BOX, | |||
$groupXObject = true, | |||
$importExternalLinks = false ) |
Imports a page.
int | $pageNumber | The page number. |
string | $box | The page boundary to import. Default set to PageBoundaries\CROP_BOX. |
bool | $groupXObject | Define the form XObject as a group XObject to support transparency (if used). |
bool | $importExternalLinks | Define whether external links are imported or not. |
string | A unique string identifying the imported page. |
CrossReferenceException | |
FilterException | |
PdfParserException | |
PdfTypeException | |
PdfReaderException |
|
protected |
Set the minimal PDF version.
string | $pdfVersion |
setPageFormat | ( | $size, | |
$orientation ) |
Set the page format of the current page.
array | $size | An array with two values defining the size. |
string | $orientation | "L" for landscape, "P" for portrait. |
BadMethodCallException |
setSourceFile | ( | $file | ) |
Set the source PDF file.
string | resource | StreamReader | $file | Path to the file or a stream resource or a StreamReader instance. |
int | The page count of the PDF document. |
PdfParserException |
setSourceFileWithParserParams | ( | $file, | |
array | $parserParams = [] ) |
Set the source PDF file with parameters which are passed to the parser instance.
This method allows us to pass e.g. authentication information to the parser instance.
string | resource | StreamReader | $file | Path to the file or a stream resource or a StreamReader instance. |
array | $parserParams | Individual parameters passed to the parser instance. |
int | The page count of the PDF document. |
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. |
useTemplate | ( | $tpl, | |
$x = 0, | |||
$y = 0, | |||
$width = null, | |||
$height = null, | |||
$adjustPageSize = false ) |
Draws a template 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 |
array | float | int | $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 |
trait FpdfTplTrait |
Trait FpdfTplTrait.
This trait adds a templating feature to FPDF and tFPDF.