# Documentation

Menu

## QRFpdf extends QROutputAbstract
in package

QRFpdf.php : 26

QRFpdf output module (requires fpdf)

##### Tags

see
  https://github.com/Setasign/FPDF
see
  http://www.fpdf.org/

### Table of Contents

$length : int
  the side length of the QR image (modules * scale)
$matrix : QRMatrix
  the (filled) data matrix object
$moduleCount : int
  the current size of the QR matrix
$moduleValues : array<string|int, mixed>
  an (optional) array of color values for the several QR matrix parts
$options : SettingsContainerInterface
$scale : int
  the current scaling for a QR pixel
__construct() : mixed
  QRFpdf constructor.
dump() : string|FPDF
base64encode() : string
  Returns a base64 data URI for the given string and mime type
getDefaultModuleValue() : mixed
  Returns a defualt value for either dark or light modules (return value depends on the output module)
getModuleValue() : mixed
  Returns the final value for the given input (return value depends on the output module)
moduleValueIsValid() : bool
  Determines whether the given value is valid
saveToFile() : void
  saves the qr data to a file
setModuleValues() : void
  Sets the initial module values

### Properties

#### $length

QROutputAbstract.php : 39

the side length of the QR image (modules * scale)

`protected int $length`

#### $matrix

QROutputAbstract.php : 49

the (filled) data matrix object

`protected QRMatrix $matrix`

#### $moduleCount

QROutputAbstract.php : 27

the current size of the QR matrix

`protected int $moduleCount`

##### Tags

see
  QRMatrix::size()

#### $moduleValues

QROutputAbstract.php : 44

an (optional) array of color values for the several QR matrix parts

`protected array<string|int, mixed> $moduleValues`

#### $options

QROutputAbstract.php : 54
`protected SettingsContainerInterface $options`

#### $scale

QROutputAbstract.php : 34

the current scaling for a QR pixel

`protected int $scale`

##### Tags

see
  QROptions::$scale

### Methods

#### __construct()

QRFpdf.php : 33

QRFpdf constructor.

`public __construct(SettingsContainerInterface $options, QRMatrix $matrix) : mixed`

##### Parameters

$options : SettingsContainerInterface
$matrix : QRMatrix

##### Tags

throws
  QRCodeOutputException

##### Return values

mixed —

#### dump()

QRFpdf.php : 73
`public dump([string $file = null ]) : string|FPDF`

##### Parameters

$file : string = null

##### Tags

inheritDoc

##### Return values

string|FPDF —

#### base64encode()

QROutputAbstract.php : 110

Returns a base64 data URI for the given string and mime type

`protected base64encode(string $data, string $mime) : string`

##### Parameters

$data : string
$mime : string

##### Return values

string —

#### getDefaultModuleValue()

QRFpdf.php : 64

Returns a defualt value for either dark or light modules (return value depends on the output module)

`protected getDefaultModuleValue(bool $isDark) : mixed`

##### Parameters

$isDark : bool

##### Tags

inheritDoc

##### Return values

mixed —

#### getModuleValue()

QRFpdf.php : 57

Returns the final value for the given input (return value depends on the output module)

`protected getModuleValue(mixed $value) : mixed`

##### Parameters

$value : mixed

##### Tags

inheritDoc

##### Return values

mixed —

#### moduleValueIsValid()

QRFpdf.php : 50

Determines whether the given value is valid

`protected moduleValueIsValid(mixed $value) : bool`

##### Parameters

$value : mixed

##### Tags

inheritDoc

##### Return values

bool —

#### saveToFile()

QROutputAbstract.php : 122

saves the qr data to a file

`protected saveToFile(string $data, string $file) : void`

##### Parameters

$data : string
$file : string

##### Tags

see
  file_put_contents()
see
  QROptions::cachefile
throws
  QRCodeOutputException

##### Return values

void —

#### setModuleValues()

QROutputAbstract.php : 72

Sets the initial module values

`protected setModuleValues() : void`

##### Return values

void —

## Search results