https://github.com/mpdf/qrcode
QR code generating library with HTML/PNG/mPDF output possibilities
https://github.com/mpdf/qrcode
Last synced: 12 months ago
JSON representation
QR code generating library with HTML/PNG/mPDF output possibilities
- Host: GitHub
- URL: https://github.com/mpdf/qrcode
- Owner: mpdf
- License: lgpl-3.0
- Created: 2019-01-14T12:14:48.000Z (over 7 years ago)
- Default Branch: development
- Last Pushed: 2024-07-02T14:57:33.000Z (almost 2 years ago)
- Last Synced: 2025-03-31T11:08:00.814Z (about 1 year ago)
- Language: HTML
- Homepage:
- Size: 1020 KB
- Stars: 45
- Watchers: 4
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# mPDF QR code library
QR code generating library with HTML/PNG/mPDF output possibilities.
[](https://travis-ci.org/mpdf/mpdf)
This is based on QrCode library bundled with mPDF until v8.0, made by Laurent Minguet. It is provided under LGPL license.
## Installation
```sh
$ composer require mpdf/qrcode
```
## Usage
```php
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);
```