BaconQrCode encodes QR codes in PHP, ported from the encoder portion of ZXing. It renders output through pluggable image backends including SVG, EPS, Imagick, and a separate GD renderer.
Overview
BaconQrCode is a PHP package for generating QR codes. It implements the encoder side of the format, based on a port of the QR code portion of the ZXing library, with the Reed–Solomon codec replaced by Phil Karn’s implementation for better performance in PHP.
Applications embed the library to produce QR images or vector files. Rendering goes through an image renderer with selectable backends: Imagick for raster output, SvgImageBackEnd for SVG via XMLWriter, and EpsImageBackEnd for EPS. GD support is provided as a dedicated GDLibRenderer rather than a standard backend, with documented limits such as no gradients and square modules only.
Developers choose a backend to match their deployment environment and quality needs. The maintainers note that Imagick can show single-pixel white artifacts inside filled regions due to an ImageMagick rasterizer issue, and recommend SVG or GD rendering when artifact-free output matters.
The package focuses on encoding; decoding is not included yet but may be added later. It is intended to be imported into PHP applications rather than run as a standalone end-user program.
Key features
- QR code encoder for PHP
- Imagick raster image backend
- SVG output via XMLWriter
- EPS vector backend
- GDLib renderer for GD limitations
- Reed–Solomon via Phil Karn codec
- Based on ZXing encoder port
Use cases
- Generate QR images in PHP web apps
- Emit SVG or EPS QR assets
- Server-side ticket or label encoding
- Invoices and receipts with QR payloads
Does the same job as
BaconQrCode doesn't name these products itself, but its own description shows it does the same job.