Skip to content

Novis\Image\QrCode

Makes QR codes: square images that a phone camera can read back to text.

Members

3 members.

MemberSignature
renderrender(string $data, ?{ size?: uint, margin?: uint, level?: Level, format?: Format } $options = null): bytes
svgsvg(string $data, ?{ margin?: uint, level?: Level } $options = null): string
giroCodegiroCode({ 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. Low repairs about 7 percent of the code, and Medium about 15 percent. Quartile repairs about 25 percent, which is a quarter of the code. High repairs about 30 percent. The default is Medium. 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.