escpos-php
|
Print buffers manage newlines and character encoding for the target printer. More...
Public Member Functions | |
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... | |
Print buffers manage newlines and character encoding for the target printer.
They are used as a swappable component: text or image-based output.
Mike42\Escpos\PrintBuffers\PrintBuffer::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.
Implemented in Mike42\Escpos\Experimental\Unifont\UnifontPrintBuffer, Mike42\Escpos\PrintBuffers\EscposPrintBuffer, and Mike42\Escpos\PrintBuffers\ImagePrintBuffer.
Mike42\Escpos\PrintBuffers\PrintBuffer::setPrinter | ( | Printer | $printer = null | ) |
Used by Escpos to hook up one-to-one link between buffers and printers.
Printer | null | $printer | New printer |
Implemented in Mike42\Escpos\Experimental\Unifont\UnifontPrintBuffer, Mike42\Escpos\PrintBuffers\EscposPrintBuffer, and Mike42\Escpos\PrintBuffers\ImagePrintBuffer.
Mike42\Escpos\PrintBuffers\PrintBuffer::writeText | ( | string | $text | ) |
Accept UTF-8 text for printing.
string | $text | Text to print |
Implemented in Mike42\Escpos\PrintBuffers\EscposPrintBuffer, Mike42\Escpos\PrintBuffers\ImagePrintBuffer, and Mike42\Escpos\Experimental\Unifont\UnifontPrintBuffer.
Mike42\Escpos\PrintBuffers\PrintBuffer::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. |
Implemented in Mike42\Escpos\PrintBuffers\EscposPrintBuffer, Mike42\Escpos\PrintBuffers\ImagePrintBuffer, and Mike42\Escpos\Experimental\Unifont\UnifontPrintBuffer.