问题
I need to know the answer of those questions, concerning Epson printers :
Can I use
Javafx
print
API to print to an EPSON printer ? or should I use theJavaPOS
API ?How do I print Images to that printer ?
How to setup page size ?
I have Epson TM-20II printer.
回答1:
Use JasperViewerFX, which is full featured JasperReport
viewer written completely in JavaFx
.
回答2:
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
来源:https://stackoverflow.com/questions/38606440/javafx-and-printing-to-epson-printer