在Java中打印pdf的代码 [英] Code for printing a pdf in java

查看:123
本文介绍了在Java中打印pdf的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在单击Java内部表单中的一个按钮时生成了一个pdf文件.然后显示了打印窗口,然后我必须单击打印按钮来打印它.在这里,我必须做更多的动作才能获得打印结果pdf.有人可以帮助我单击java Internal form中的按钮来生成pdf或文档的打印.即;在单击名为Print的按钮时,我想从pdf或文档中获取打印内容,就像超市中的计费系统一样.

I have generated a pdf file while clicking a button in the java Internal form.Then the print window is dispalyed and then i have to click the print button to print it.Here i have to do more actions to get the print of a pdf.Can someone help me to generate the print of a pdf or document in single click of the button placed in the java Internal form.ie;while clicking a button named Print I want to get the print out of the pdf or document,just like a billing system in a supermarket.

推荐答案

我认为PDF渲染器可能会起作用.在这里看看:
http://webmoli.com/2008/11/03/java-print-pdf/ [^ ]

祝你好运!
I think PDF renderer might work. Have a look here:
http://webmoli.com/2008/11/03/java-print-pdf/[^]

Good luck!


生成PDF并比将其扔到OS上用Adobe Reader或foxxit或其他工具打开它要简单得多(也是常见的解决方案).已安装.
It''s much simpler (and a common solution) to generate a PDF and than just throw it at the OS to open that one with Adobe Reader or foxxit or whatever is installed.


这篇关于在Java中打印pdf的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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