-
Notifications
You must be signed in to change notification settings - Fork 862
Text encoding
Michael Billington edited this page Dec 8, 2019
·
11 revisions
This method is used by default.
Example:
// TODO example here.
How it works:
- Each printer has glyphs from a number of legacy code pages, numbered 0-255 on the printer. The exact mapping varies considerably between printers.
- 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.
- In PHP code, the matching profile is loaded into a
CapabilityProfile
object. Thedefault
profile is used if none is specified. - 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).
Example:
// TODO example here.
How it works:
- TBD
Compatibility:
- TBD
Example:
// TODO example here.
How it works:
- TBD
Compatibility:
- TBD
Example:
// TODO example here.
How it works:
- TBD
Compatibility:
- TBD