

Public Member Functions | |
| flush () | |
| getPrinter () | |
| setPrinter (Printer $printer=null) | |
| writeText ($text) | |
| writeTextRaw ($text) | |
| setFont ($font) | |
| setFontSize ($fontSize) | |
This class renders text to small images on-the-fly. It attempts to mimic the behaviour of text output, whilst supporting any fonts & character encodings which your system can handle. This class currently requires Imagick.
| Mike42\Escpos\PrintBuffers\ImagePrintBuffer::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\ImagePrintBuffer::getPrinter | ( | ) |
Used by Escpos to check if a printer is set.
Implements Mike42\Escpos\PrintBuffers\PrintBuffer.
| Mike42\Escpos\PrintBuffers\ImagePrintBuffer::setFont | ( | $font | ) |
Set path on disk to TTF font that will be used to render text to image, or 'null' to use a default.
ImageMagick will also accept a font name, but this will not port as well between systems.
| string | $font | Font name or a filename |
| Mike42\Escpos\PrintBuffers\ImagePrintBuffer::setFontSize | ( | $fontSize | ) |
Numeric font size for rendering text to image
| Mike42\Escpos\PrintBuffers\ImagePrintBuffer::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\ImagePrintBuffer::writeText | ( | $text | ) |
Accept UTF-8 text for printing.
| string | $text | Text to print |
Implements Mike42\Escpos\PrintBuffers\PrintBuffer.
| Mike42\Escpos\PrintBuffers\ImagePrintBuffer::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.
1.8.8