| escpos-php

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
Mike42\Escpos\PrintBuffers\ImagePrintBuffer Class Reference
Inheritance diagram for Mike42\Escpos\PrintBuffers\ImagePrintBuffer:
[legend]
Collaboration diagram for Mike42\Escpos\PrintBuffers\ImagePrintBuffer:
[legend]

## Public Member Functions
| flush ()
| getPrinter ()
| setPrinter (Printer $printer=null)
| writeText ($text)
| writeTextRaw ($text)
| setFont ($font)
| setFontSize ($fontSize)

## Detailed Description

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.

## Member Function Documentation

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.

Parameters

  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.

Parameters

  Printer | null | $printer | New printer

Implements Mike42\Escpos\PrintBuffers\PrintBuffer.

Mike42\Escpos\PrintBuffers\ImagePrintBuffer::writeText | ( |  | $text | ) |

Accept UTF-8 text for printing.

Parameters

  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.

Parameters

  string | $text | Text to print, already the target encoding.

Implements Mike42\Escpos\PrintBuffers\PrintBuffer.

The documentation for this class was generated from the following file:

- C:/www/aplusnet/incahellas.com/public_html/lib/escpos-php-development/src/Mike42/Escpos/PrintBuffers/ImagePrintBuffer.php