Novis\Image\QrCode
Makes QR codes: square images that a phone camera can read back to text.
Members
3 members.
| Member | Signature |
|---|---|
render | render(string $data, ?{ size?: uint, margin?: uint, level?: Level, format?: Format } $options = null): bytes |
svg | svg(string $data, ?{ margin?: uint, level?: Level } $options = null): string |
giroCode | giroCode({ name: string, iban: string, amount?: decimal, bic?: string, reference?: string, text?: string } $payment): string |
Enums
Level { Low, Medium, Quartile, High }How much of a QR code can be damaged and still be read. A QR code stores extra data to repair the parts that a scanner cannot read. This is called error correction.Lowrepairs about 7 percent of the code, andMediumabout 15 percent.Quartilerepairs about 25 percent, which is a quarter of the code.Highrepairs about 30 percent. The default isMedium. A higher level makes a bigger code for the same data.
Example apps
These complete apps use this class. You can download and run each one.
- PDF documents: A small web app that makes three PDF files. They are an invoice, an encrypted report and event tickets. See each file, then run the app and its tests.
