Skip to content
Michael Billington edited this page Dec 8, 2019 · 11 revisions

ESC/POS native

This method is used by default.

Example:

// TODO example here.

How it works:

  1. Each printer has glyphs from a number of legacy code pages, numbered 0-255 on the printer. The exact mapping varies considerably between printers.
  2. The developer finds out which code pages their printer supports, and checks that they are listed correctly in the ESC/POS printer database. There is information about adding a printer here.
  3. In PHP code, the matching profile is loaded into a CapabilityProfile object. The default profile is used if none is specified.
  4. UTF-8 text is then passed to $printer -> text('...'), and the library will convert it character-by-character.

Compatibility:

  • This works for most European languages, and is configured out-of-the box to match the code pages present on common Epson-branded printers.
  • Printers which have an uncertain code page mapping (eg. not listed correctly in the receipt printer database) will not produce usable output outside of ASCII text.
  • If a printer does not have the glyphs that you are trying to use, then this method will not work.
  • If there is not a 1-1 relationship between characters and glyphs in your script, then this method will not produce usable output. This includes scripts which require the use of presentation forms, composing characters or bi-directional text (eg. Thai, Khmer, Indian scripts, Arabic).

Via custom fonts

Example:

// TODO example here.

How it works:

  • TBD

Compatibility:

  • TBD

Via external tools

Example:

// TODO example here.

How it works:

  • TBD

Compatibility:

  • TBD

Via ImagePrintBuffer

Example:

// TODO example here.

How it works:

  • TBD

Compatibility:

  • TBD
Clone this wiki locally