Skip to content

Novis\Image\Barcode

Makes barcodes: lines of bars that a scanner reads, and the square DataMatrix code.

Members

2 members.

MemberSignature
renderrender(string $data, Symbology $symbology, ?{ height?: uint, module?: uint, margin?: uint, text?: bool, format?: Format } $options = null): bytes
svgsvg(string $data, Symbology $symbology, ?{ height?: uint, module?: uint, margin?: uint, text?: bool } $options = null): string

Enums

  • Symbology { Code128, Gs1128, Ean13, Ean8, UpcA, Code39, Itf14, DataMatrix }The barcode format that Barcode::render and Barcode::svg draw. A barcode format is also called a symbology. Ean13 and UpcA are the barcodes on products in shops. UpcA is used in North America. Ean8 is the short form for small products. Itf14 is the barcode on a shipping box. Code128 and Code39 contain text, such as a tracking number. Gs1128 contains standard fields, such as a product number and a batch number. DataMatrix is a square code. The others are lines of bars.

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.