setasign\Fpdi

FpdfTrait This trait is used for the implementation of FPDI in FPDF and tFPDF.

File: /FPDI v2/FpdfTrait.php

Used in

Summary

Methods

_enddoc()

protected FpdfTrait::_enddoc (
void
): void

_put()

protected FpdfTrait::_put (
$s [, $newLine = true ]
): void
Parameters
$s
 
$newLine
 

_putimages()

_putlinks()

protected FpdfTrait::_putlinks (
int $n
): void
Parameters
$n : int
 
Exceptions

Throws PdfParser\Type\PdfTypeException

_putxobjectdict()

protected FpdfTrait::_putxobjectdict (
void
): void

getTemplateSize()

public FpdfTrait::getTemplateSize (
mixed $tpl [, float|int|null $width = null [, float|int|null $height = null ]]
): array|bool

Get the size of an imported page or template.

Give only one of the size parameters (width, height) to calculate the other one automatically in view to the aspect ratio.

Parameters
$tpl : mixed

The template id

$width : float|int|null

The width.

$height : float|int|null

The height.

Return Values

An array with following keys: width, height, 0 (=width), 1 (=height), orientation (L or P)

useTemplate()

public FpdfTrait::useTemplate (
mixed $tpl [, float|int|array $x = 0 [, float|int $y = 0 [, float|int|null $width = null [, float|int|null $height = null [, bool $adjustPageSize = false ]]]]]
): array

Draws an imported page or 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.

Parameters
$tpl : mixed

The template id

$x : float|int|array

The abscissa of upper-left corner. Alternatively you could use an assoc array with the keys "x", "y", "width", "height", "adjustPageSize".

$y : float|int

The ordinate of upper-left corner.

$width : float|int|null

The width.

$height : float|int|null

The height.

$adjustPageSize : bool
 
Return Values

The size

See