

Public Member Functions | |
| __construct () | |
| flush () | |
| getPrinter () | |
| setPrinter (Printer $printer=null) | |
| writeText ($text) | |
| writeTextRaw ($text) | |
Public Attributes | |
| const | COMPRESS_CACHE = true |
| const | INPUT_ENCODING = "UTF-8" |
| const | REPLACEMENT_CHAR = "?" |
This class manages newlines and character encoding for the target printer, and can be interchanged for an image-bassed buffer (ImagePrintBuffer) if you can't get it operating properly on your machine.
| Mike42\Escpos\PrintBuffers\EscposPrintBuffer::__construct | ( | ) |
Empty print buffer.
| Mike42\Escpos\PrintBuffers\EscposPrintBuffer::flush | ( | ) |
Cause the buffer to send any partial input and wait on a newline. If the printer is already on a new line, this does nothing.
Implements Mike42\Escpos\PrintBuffers\PrintBuffer.
| Mike42\Escpos\PrintBuffers\EscposPrintBuffer::getPrinter | ( | ) |
Used by Escpos to check if a printer is set.
Implements Mike42\Escpos\PrintBuffers\PrintBuffer.
| Mike42\Escpos\PrintBuffers\EscposPrintBuffer::setPrinter | ( | Printer | $printer = null | ) |
Used by Escpos to hook up one-to-one link between buffers and printers.
| Printer | null | $printer | New printer |
Implements Mike42\Escpos\PrintBuffers\PrintBuffer.
| Mike42\Escpos\PrintBuffers\EscposPrintBuffer::writeText | ( | $text | ) |
Accept UTF-8 text for printing.
| string | $text | Text to print |
Implements Mike42\Escpos\PrintBuffers\PrintBuffer.
| Mike42\Escpos\PrintBuffers\EscposPrintBuffer::writeTextRaw | ( | $text | ) |
Accept 8-bit text in the current encoding and add it to the buffer.
| string | $text | Text to print, already the target encoding. |
Implements Mike42\Escpos\PrintBuffers\PrintBuffer.
| const Mike42\Escpos\PrintBuffers\EscposPrintBuffer::COMPRESS_CACHE = true |
True to cache output as .z, false to leave un-compressed (useful for debugging)
| const Mike42\Escpos\PrintBuffers\EscposPrintBuffer::INPUT_ENCODING = "UTF-8" |
The input encoding of the buffer.
| const Mike42\Escpos\PrintBuffers\EscposPrintBuffer::REPLACEMENT_CHAR = "?" |
Un-recognised characters will be replaced with this.
1.8.8