Download the PHP package attestra/qr-code without Composer
On this page you can find all versions of the php package attestra/qr-code. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package qr-code
QR Code
By endroid
This library helps you generate QR codes in a jiffy. Makes use of bacon/bacon-qr-code to generate the matrix and khanamiryan/qrcode-detector-decoder for validating generated QR codes. Further extended with Twig extensions, generation routes, a factory and a Symfony bundle for easy installation and configuration. Different writers are provided to generate the QR code as PNG, SVG, EPS or in binary format.
Installation
Use Composer to install the library.
Usage: using the builder
Usage: without using the builder
Usage: working with results
Writer options
Encoding
If you use a barcode scanner you can have some troubles while reading the
generated QR codes. Depending on the encoding you chose you will have an extra
amount of data corresponding to the ECI block. Some barcode scanner are not
programmed to interpret this block of information. To ensure a maximum
compatibility you can use the ISO-8859-1
encoding that is the default
encoding used by barcode scanners (if your character set supports it,
i.e. no Chinese characters are present).
Round block size mode
By default block sizes are rounded to guarantee sharp images and improve readability. However some other rounding variants are available.
margin (default)
: the size of the QR code is shrunk if necessary but the size of the final image remains unchanged due to additional margin being added.enlarge
: the size of the QR code and the final image are enlarged when rounding differences occur.shrink
: the size of the QR code and the final image are shrunk when rounding differences occur.none
: No rounding. This mode can be used when blocks don't need to be rounded to pixels (for instance SVG).
Readability
The readability of a QR code is primarily determined by the size, the input
length, the error correction level and any possible logo over the image so you
can tweak these parameters if you are looking for optimal results. You can also
check $qrCode->getRoundBlockSize() value to see if block dimensions are rounded
so that the image is more sharp and readable. Please note that rounding block
size can result in additional padding to compensate for the rounding difference.
And finally the encoding (default UTF-8 to support large character sets) can be
set to ISO-8859-1
if possible to improve readability.
Built-in validation reader
You can enable the built-in validation reader (disabled by default) by calling setValidateResult(true). This validation reader does not guarantee that the QR code will be readable by all readers but it helps you provide a minimum level of quality. Take note that the validator can consume quite amount of additional resources and it should be installed separately only if you use it.
Versioning
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.
License
This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.