Skip to content

Kirby 4.4.1

$qrcode->write()

Saves the QR code to a file.

$qrcode->write(string $file, string|int|null $size = null, string $color = '#000000', string $back = '#ffffff', int $border = 4): void

Parameters

Name Type Default Description
$file * string Path to the output file with one of the supported file extensions
$size string|int|null null Optional image width/height in pixels (defaults to a size per module of 4x4) or CSS width of the <svg> element
$color string '#000000' Foreground color in hex format
$back string '#ffffff' Background color in hex format
$border int 4 Border size in number of modules

Parent class

Kirby\Image\QrCode