public abstract class AbstractEpsonPrinterDriver extends Object implements PrinterDriver
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractEpsonPrinterDriver.DriverState |
Modifier and Type | Field and Description |
---|---|
static String |
FONT_15_CPI |
static String |
OP_NO_ASSIGN_CHAR_TABLE |
Modifier | Constructor and Description |
---|---|
protected |
AbstractEpsonPrinterDriver(OutputStream out,
float charsPerInch,
float linesPerInch,
String printerModel) |
Modifier and Type | Method and Description |
---|---|
void |
endLine(boolean overflow)
Ends a new line.
|
void |
endPage(boolean overflow)
Ends the current page.
|
void |
flush()
Flushes the output stream.
|
float |
getCharactersPerInch()
Gets the default character width in CPI.
|
AbstractEpsonPrinterDriver.DriverState |
getDriverState() |
protected EncodingUtilities |
getEncodingUtilities(String encoding) |
byte |
getFallBackCharset() |
FontMapper |
getFontMapper() |
float |
getLinesPerInch()
Gets the default line height.
|
protected OutputStream |
getOut() |
PrinterSpecification |
getPrinterSpecification() |
protected abstract PrinterSpecificationManager |
getPrinterSpecificationManager() |
protected boolean |
isFirstPage() |
void |
printChunk(PlaintextDataChunk chunk)
Prints a single text chunk at the given position on the current line.
|
void |
printEmptyChunk(int count)
Prints an empty chunk.
|
void |
printRaw(byte[] raw)
Prints some raw content.
|
protected void |
sendDefineCharacterWidth(float charactersPerInch) |
protected void |
sendDefineCodepage(String encoding,
int characterTable) |
protected void |
sendDefineFont(byte printerFont) |
protected void |
sendDefineHorizontalBorders(int left,
int right) |
protected abstract void |
sendDefineLineSpacing(float lineHeightInPoints) |
protected void |
sendDefinePageLengthInLines(int paperSizeInLines) |
protected void |
sendDefineUserCharacters() |
protected abstract void |
sendFontStyle(boolean bold,
boolean italic,
boolean underline,
boolean strikeTrough) |
protected void |
sendResetPrinter() |
void |
setFallBackCharset(byte fallBackCharset) |
void |
setFontMapper(FontMapper fontMapper) |
void |
startLine()
Starts a new line.
|
void |
startPage(Paper paper,
String encoding)
Resets the printer and starts a new page.
|
public static final String OP_NO_ASSIGN_CHAR_TABLE
public static final String FONT_15_CPI
protected AbstractEpsonPrinterDriver(OutputStream out, float charsPerInch, float linesPerInch, String printerModel)
public AbstractEpsonPrinterDriver.DriverState getDriverState()
public FontMapper getFontMapper()
public void setFontMapper(FontMapper fontMapper)
protected OutputStream getOut()
protected boolean isFirstPage()
public PrinterSpecification getPrinterSpecification()
public void endLine(boolean overflow) throws IOException
endLine
in interface PrinterDriver
overflow
- IOException
- if an IOError occures.public void endPage(boolean overflow) throws IOException
endPage
in interface PrinterDriver
overflow
- IOException
- if there was an IOError while writing the commandpublic float getCharactersPerInch()
getCharactersPerInch
in interface PrinterDriver
public float getLinesPerInch()
getLinesPerInch
in interface PrinterDriver
public void flush() throws IOException
flush
in interface PrinterDriver
IOException
- if an IOError occured.public void printChunk(PlaintextDataChunk chunk) throws IOException
printChunk
in interface PrinterDriver
chunk
- the chunk that should be writtenIOException
- if an IO error occured.protected abstract void sendFontStyle(boolean bold, boolean italic, boolean underline, boolean strikeTrough) throws IOException
IOException
protected void sendDefineFont(byte printerFont) throws IOException
IOException
public void printEmptyChunk(int count) throws IOException
printEmptyChunk
in interface PrinterDriver
IOException
- if an IOError occured.public void printRaw(byte[] raw) throws IOException
printRaw
in interface PrinterDriver
raw
- the content that should be printed.IOException
public void startLine() throws IOException
startLine
in interface PrinterDriver
IOException
- if an IOError occures.public void startPage(Paper paper, String encoding) throws IOException
startPage
in interface PrinterDriver
IOException
- if there was an IOError while writing the commandprotected void sendDefineCharacterWidth(float charactersPerInch) throws IOException
IOException
protected void sendResetPrinter() throws IOException
IOException
protected abstract void sendDefineLineSpacing(float lineHeightInPoints) throws IOException
IOException
protected void sendDefinePageLengthInLines(int paperSizeInLines) throws IOException
IOException
protected void sendDefineHorizontalBorders(int left, int right) throws IOException
IOException
protected void sendDefineCodepage(String encoding, int characterTable) throws IOException
IOException
protected void sendDefineUserCharacters()
protected EncodingUtilities getEncodingUtilities(String encoding) throws IOException
IOException
protected abstract PrinterSpecificationManager getPrinterSpecificationManager()
public byte getFallBackCharset()
public void setFallBackCharset(byte fallBackCharset)
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.