从Java内部无声打印PDF [英] Silent Printing of PDF From Within Java

查看:119
本文介绍了从Java内部无声打印PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在研究Java内部的PDF文档的静默打印。打印将从桌面调用,而不是通过浏览器调用,因此我们无法使用JavaScript。 PDF Renderer是一种可操作的解决方案,但它们的渲染质量是不可接受的。 iText似乎不能与Java打印服务一起插件。有一些商业Java库,Qoppa的jPDFPrint,JPedal和ICEpdf,我们还没有尝试过。

We are looking into silent printing of PDF documents from within Java. The printing will be invoked from the desktop and not through a browser so we cannot use JavaScript. PDF Renderer is an operational solution but their rendering quality is not acceptable. iText does not seem to be pluggable with the Java print service. There are some commercial Java libraries, jPDFPrint by Qoppa, JPedal, and ICEpdf which we have not tried out yet.

有没有人有从Java静态打印的经验?

Does anybody have any experience with PDF silent printing from Java?

推荐答案

Apache PDFBox的。它目前处于孵化阶段,但PDF打印功能在此之前就已存在。在内部,它使用Java打印服务来创建打印作业,它还支持静默打印

Apache PDFBox. It is currently in incubation, but the PDF printing functionality has been around before that. Internally, it uses the Java Print Services to create a print job, and it also supports silent printing.

请注意它也需要Fontbox,以及当前(即将发布的0.8.0版本)包含Type 0字体的文档的优雅后备。 1号字体打印正确;但是在0.7.3中,尝试使用Type 0字体打印文档将导致抛出异常。

Do note that it requires Fontbox as well, and the current (upcoming 0.8.0 release) has included graceful fallback for documents with Type 0 fonts. Type 1 fonts are printed correctly; however in 0.7.3, attempts to print documents with Type 0 fonts will result in an exception being thrown.

这篇关于从Java内部无声打印PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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