Kufrik/vendor/mpdf/qrcode
Kowalski 4471344edc QR Platba 2026-11-01 18:56:37 +01:00
..
.github QR Platba 2026-11-01 18:56:37 +01:00
data QR Platba 2026-11-01 18:56:37 +01:00
src QR Platba 2026-11-01 18:56:37 +01:00
tests QR Platba 2026-11-01 18:56:37 +01:00
.gitignore QR Platba 2026-11-01 18:56:37 +01:00
LICENSE QR Platba 2026-11-01 18:56:37 +01:00
README.md QR Platba 2026-11-01 18:56:37 +01:00
composer.json QR Platba 2026-11-01 18:56:37 +01:00
phpunit.xml QR Platba 2026-11-01 18:56:37 +01:00
ruleset.xml QR Platba 2026-11-01 18:56:37 +01:00

README.md

mPDF QR code library

QR code generating library with HTML/PNG/mPDF output possibilities.

Build Status

This is based on QrCode library bundled with mPDF until v8.0, made by Laurent Minguet. It is provided under LGPL license.

Installation

$ composer require mpdf/qrcode

Usage

<?php

use Mpdf\QrCode\QrCode;
use Mpdf\QrCode\Output;

$qrCode = new QrCode('Lorem ipsum sit dolor');

// Save black on white PNG image 100 px wide to filename.png. Colors are RGB arrays.
$output = new Output\Png();
$data = $output->output($qrCode, 100, [255, 255, 255], [0, 0, 0]);
file_put_contents('filename.png', $data);

// Echo a SVG file, 100 px wide, black on white.
// Colors can be specified in SVG-compatible formats
$output = new Output\Svg();
echo $output->output($qrCode, 100, 'white', 'black');

// Echo an HTML table
$output = new Output\Html();
echo $output->output($qrCode);