escpos-php
|
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. More...
Public Member Functions | |
__construct () | |
Empty print buffer. | |
flush () | |
Cause the buffer to send any partial input and wait on a newline. More... | |
getPrinter () | |
Used by Escpos to check if a printer is set. | |
setPrinter (Printer $printer=null) | |
Used by Escpos to hook up one-to-one link between buffers and printers. More... | |
writeText (string $text) | |
Accept UTF-8 text for printing. More... | |
writeTextRaw (string $text) | |
Accept 8-bit text in the current encoding and add it to the buffer. More... | |
Public Attributes | |
const | COMPRESS_CACHE = true |
True to cache output as .z, false to leave un-compressed (useful for debugging) | |
const | REPLACEMENT_CHAR = "?" |
Un-recognised characters will be replaced with this. | |
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::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::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 | ( | string | $text | ) |
Accept UTF-8 text for printing.
string | $text | Text to print |
Implements Mike42\Escpos\PrintBuffers\PrintBuffer.
Mike42\Escpos\PrintBuffers\EscposPrintBuffer::writeTextRaw | ( | string | $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.