org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.driver
Interface PrinterDriver

All Known Implementing Classes:
AbstractEpsonPrinterDriver, Epson24PinPrinterDriver, Epson9PinPrinterDriver, IBMCompatiblePrinterDriver, TextFilePrinterDriver

public interface PrinterDriver


Method Summary
 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.
 float getLinesPerInch()
          Gets the default line height.
 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[] out)
          Prints some raw content.
 void startLine()
          Starts a new line.
 void startPage(Paper paper, String encoding)
          Resets the printer and starts a new page.
 

Method Detail

getCharactersPerInch

float getCharactersPerInch()
Gets the default character width in CPI.

Returns:
the default character width in CPI.

getLinesPerInch

float getLinesPerInch()
Gets the default line height.

Returns:
the default line height.

startPage

void startPage(Paper paper,
               String encoding)
               throws IOException
Resets the printer and starts a new page. Prints the top border lines (if necessary).

Throws:
IOException - if there was an IOError while writing the command

endPage

void endPage(boolean overflow)
             throws IOException
Ends the current page. Should print empty lines or an FORM_FEED command.

Parameters:
overflow -
Throws:
IOException - if there was an IOError while writing the command

startLine

void startLine()
               throws IOException
Starts a new line.

Throws:
IOException - if an IOError occures.

endLine

void endLine(boolean overflow)
             throws IOException
Ends a new line.

Parameters:
overflow -
Throws:
IOException - if an IOError occures.

printChunk

void printChunk(PlaintextDataChunk chunk)
                throws IOException
Prints a single text chunk at the given position on the current line. The chunk should not be printed, if an previous chunk overlays this chunk.

Parameters:
chunk - the chunk that should be written
Throws:
IOException - if an IO error occured.

printEmptyChunk

void printEmptyChunk(int count)
                     throws IOException
Prints an empty chunk. This is called for all undefined chunk-cells. The last defined font is used to print that empty text.

Throws:
IOException - if an IOError occured.

flush

void flush()
           throws IOException
Flushes the output stream.

Throws:
IOException - if an IOError occured.

printRaw

void printRaw(byte[] out)
              throws IOException
Prints some raw content. This content is not processed in any way, so be very carefull.

Parameters:
out - the content that should be printed.
Throws:
IOException