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

时间:2021-03-03 15:22:43

I am using PD4ML jar file to convert my HTML code into PDF file. 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.

我正在使用PD4ML jar文件将我的HTML代码转换为PDF文件。我正在保存文件。现在问题是我想在将该文件保存到用户后直接显示该文件。请建议我。

Thanks, Vara Kumar PJD

谢谢,Vara Kumar PJD

2 个解决方案

#1


0  

Two possibilities:

  • Call Acrobat with the file. You don't have to know where it is installed, if you use cmd as a wrapper to start the acroread from java.
  • 使用该文件调用Acrobat。如果使用cmd作为包装器从java启动acroread,则无需知道它的安装位置。

  • Use your own PDF rendering library, like PDFOne.
  • 使用您自己的PDF呈现库,如PDFOne。

#2


0  

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. We use a barebones browser launcher by Dem Pilafian - here is the URL:

您可以启动一个浏览器窗口,其中包含PDF文件的完整路径作为URL - 浏览器应该启动acroread以查看文件。我们使用Dem Pilafian的准系统浏览器启动器 - 这是URL:

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

Hope this helps.

希望这可以帮助。

#1


0  

Two possibilities:

  • Call Acrobat with the file. You don't have to know where it is installed, if you use cmd as a wrapper to start the acroread from java.
  • 使用该文件调用Acrobat。如果使用cmd作为包装器从java启动acroread,则无需知道它的安装位置。

  • Use your own PDF rendering library, like PDFOne.
  • 使用您自己的PDF呈现库,如PDFOne。

#2


0  

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. We use a barebones browser launcher by Dem Pilafian - here is the URL:

您可以启动一个浏览器窗口,其中包含PDF文件的完整路径作为URL - 浏览器应该启动acroread以查看文件。我们使用Dem Pilafian的准系统浏览器启动器 - 这是URL:

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

Hope this helps.

希望这可以帮助。