apijavafxprintingepsonjavapos

JavaFX and printing to Epson printer


I need to know the answer of those questions, concerning Epson printers :

  1. Can I use Javafx print API to print to an EPSON printer ? or should I use the JavaPOS API ?

  2. How do I print Images to that printer ?

  3. How to setup page size ?

I have Epson TM-20II printer.


Solution

  • After some research and experience with an epson printer (the model in the question)

    Can I use Javafx print API to print to an EPSON printer ? or should I use the JavaPOS API ? How do I print Images to that printer ? Any document can be printed using that printer whatever api is used.

    Of course. A print api and the one existing in JavaFX can be used to print to that printer.

    How to setup page size ?

    A page can be created using a helper method, embedded into JavaFx api, as follows :

    PrintHelper.createPaper("PapperName", width, height, Units.MM);
    

    width -> int

    height -> int