JavaFX and printing to Epson printer

自闭症网瘾萝莉.ら 提交于 2020-01-15 10:03:44

问题


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.


回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!