Java 生成的 PDF 在屏幕上呈现良好,但无法正确打印
我通过打印 JComponent 从 swing 应用程序生成复杂的 PDF。
此 PDF 是通过从 iText PdfTemplate 对象获取代理 Graphics2D 对象来创建的。
PDF 可在屏幕上查看,但在 Lexmark 4650 上以横幅模式从 Windows 打印时,打印会在第四页后中断,大多数项目不会打印。
有没有什么好方法可以查看PDF的内容,看看是否有什么不合规矩的地方?鉴于 PDF 包含的信息,该 PDF 似乎比实际需要的要大。
或者,从 Lexmark 打印机获取有用错误的方法?
编辑 2011-10- 18 13:45:00 PST:用 PDF 形状数据较少的较小版本替换 PDF。仍然无法正确打印。
这是打印机的输出。您可以看到打印输出在达到 410 深度后不久就被切断。
I'm generating a complex PDF from a swing application by printing my JComponent.
This PDF is created by getting a proxy Graphics2D object from an iText PdfTemplate object.
The PDF is viewable on-screen, but when printed in banner mode on a Lexmark 4650 from windows printing cuts off after the fourth page, with most items not being printed.
Is there a good way to look at the contents of the PDF to see if something is out of line? The PDF seems to be larger than it needs to be, given the information it contains.
Or, a way to get a useful error from the Lexmark printer?
EDIT 2011-10-18 13:45:00 PST: replaced PDF with a smaller version with less PDF shape data. Still not printing correctly.
Here is the output from the printer. You can see that printout cuts off shortly after the 410 depth.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们已经看到,当没有足够的内存时,打印会失败 - 打印需要比屏幕大得多的光栅。增加记忆力有帮助吗?
We have seen printing fail when there is not enough memory - printing needs a much bigger raster than screen. Does increasing memory help?
存在渲染问题,即一条线被绘制到 Integer.MIN_VALUE 的坐标,这使打印机非常不满意。
There was a rendering issue where a line was being drawn to a coordinate of Integer.MIN_VALUE, this made the printer very unhappy.