简体   繁体   English

我们如何直接显示打印的文件?

[英]How can we show the printed file directly?

I am using PD4ML jar file to convert my HTML code into PDF file. 我正在使用PD4ML jar文件将HTML代码转换为PDF文件。 And I am saving the file. 我正在保存文件。 Now the thing is I want to show that file directly after saved that file to user. 现在,我想将文件保存到用户后直接显示该文件。 Please suggest me. 请给我建议。

Thanks, Vara Kumar PJD 谢谢,Vara Kumar PJD

Two possibilities: 两种可能性:

  • Call Acrobat with the file. 用文件调用Acrobat。 You don't have to know where it is installed, if you use cmd as a wrapper to start the acroread from java. 如果使用cmd作为包装器从Java启动acroread,则不必知道它的安装位置。
  • Use your own PDF rendering library, like PDFOne. 使用您自己的PDF渲染库,例如PDFOne。

You can launch a browser window with the full path of the PDF file as the URL - the browser should in turn kick off acroread to view the file. 您可以使用PDF文件的完整路径作为URL来启动浏览器窗口-浏览器应依次启动acroread来查看文件。 We use a barebones browser launcher by Dem Pilafian - here is the URL: 我们使用Dem Pilafian的准系统浏览器启动器-以下是URL:

http://www.centerkey.com/java/browser/ http://www.centerkey.com/java/browser/

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM