How to print a Workbook file made using Apache Poi and java?

狂风中的少年 提交于 2020-01-11 11:25:49

问题


I create one page workbook files in eclipse and need to open the print dialog box and print these files off. I understand how to open the print dialog box and everything, i just can't find how to tell the system that it is the workbook file "wb" that is what i'm wanting to print. So opening the dialog just doesn't work unless it knows what i'm trying to print with it. Could someone at least send me in the right direction Without telling me to read the java print dialog tutorials. I've read them three times now and i don't understand how to make my situation work :/ I'm not handling graphic objects, i'm handling workbook objects.


回答1:


Although there are some rumors around here that say it's not possible to do it directly, you might want to convert it first to PDF (1,2) and then print it.

I haven't tried pdfbox printing, if the results are disappointing, it might be possible to use libre office not only as a converter, but also as the printing engine ...



来源:https://stackoverflow.com/questions/16704624/how-to-print-a-workbook-file-made-using-apache-poi-and-java

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