Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

This file is part of FPDI

Copyright: Copyright (c) 2019 Setasign - Jan Slabon (https://www.setasign.com)
License: http://opensource.org/licenses/mit-license The MIT License
File Size: 155 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Fpdi:: (6 methods):
  _enddoc()
  useTemplate()
  getTemplateSize()
  _putimages()
  _putxobjectdict()
  _put()


Class: Fpdi  - X-Ref

Class Fpdi

This class let you import pages of existing PDF documents into a reusable structure for FPDF.

_enddoc()   X-Ref
FPDI version


useTemplate($tpl, $x = 0, $y = 0, $width = null, $height = null, $adjustPageSize = false)   X-Ref
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.

param: mixed $tpl The template id
param: float|int|array $x The abscissa of upper-left corner. Alternatively you could use an assoc array
param: float|int $y The ordinate of upper-left corner.
param: float|int|null $width The width.
param: float|int|null $height The height.
param: bool $adjustPageSize
return: array The size

getTemplateSize($tpl, $width = null, $height = null)   X-Ref
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.

param: mixed $tpl The template id
param: float|int|null $width The width.
param: float|int|null $height The height.
return: array|bool An array with following keys: width, height, 0 (=width), 1 (=height), orientation (L or P)

_putimages()   X-Ref


_putxobjectdict()   X-Ref


_put($s, $newLine = true)   X-Ref