使用java打印多种文件类型 [英] Printing multiple file types using java

查看:43
本文介绍了使用java打印多种文件类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我想知道是否有用于打印一堆常见文件类型(pdf、doc、docx、txt 等)的特定 api.我正在尝试开发类似于 HP 的 eprint 的程序.eprint 让我很恼火,因为它会打印一封电子邮件以及附加到它的文件.我只是想要一些我可以直接发送文件的东西.我发现 java 有一个打印 api,但它似乎专注于从 gui 窗口打印一些东西.非常感谢任何想法!

Hey i was wondering if there is a specific api for printing a bunch of common file types(pdf,doc,docx,txt, etc..). I am trying to develop program similar to HP's eprint. eprint annoys me because it prints an email as well as the file attached to it. I just want something i can send files directly to. I have found that java has a printing api, but that seems to focus on printing something from a gui window. any ideas much appreciated!

谢谢

变形

推荐答案

单靠 Java 很难打印各种不同的文件类型,而且大部分时间我都看到 Java 程序使用其他程序使用 Runtime.exec 进行打印.如果您打算尝试使用它,请务必阅读这篇非常重要的文章:当 Runtime.exec() 不会

It would be difficult for Java alone to be able to print a variety of different file types, and most of the time I've seen Java programs use other programs to do the printing by using Runtime.exec. If you're going to be trying to use this though, please be sure to read this extremely important article: When Runtime.exec() won't

这篇关于使用java打印多种文件类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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