Skip to content

Kirby 4.2.0

$qrcode->write()

Saves the QR code to a file.

$qrcode->write(string $file, string|int|null $size = null, string $color = '#000000', string $back = '#ffffff'): 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

Parent class

Kirby\Image\QrCode