如何打印使用 Apache Poi 和 java 制作的工作簿文件? [英] How to print a Workbook file made using Apache Poi and java?

查看:29
本文介绍了如何打印使用 Apache Poi 和 java 制作的工作簿文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 eclipse 中创建了一页工作簿文件,需要打开打印对话框并打印这些文件.我了解如何打开打印对话框和所有内容,但我找不到如何告诉系统我要打印的是工作簿文件wb".所以打开对话框是行不通的,除非它知道我想用它打印什么.有人至少可以将我发送到正确的方向而不告诉我阅读 java 打印对话框教程.我已经读了三遍了,但我不明白如何让我的情况正常工作:/我不是在处理图形对象,而是在处理工作簿对象.

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.

推荐答案

虽然这里有一些一些谣言说它不可能直接做,你可能想先把它转换成 PDF (1,2a>) 然后打印.

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.

我没试过pdfbox打印,如果结果不满意,也许可以将libre office不仅用作转换器,还可以用作打印引擎...

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 ...

这篇关于如何打印使用 Apache Poi 和 java 制作的工作簿文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆