开发者

How can we show the printed file directly?

开发者 https://www.devze.com 2023-02-07 12:41 出处:网络
I am using PD4ML jarfile to conve开发者_C百科rt 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 m

I am using PD4ML jar file to conve开发者_C百科rt 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.

Thanks, Vara Kumar PJD


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.
  • Use your own PDF rendering library, like 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. We use a barebones browser launcher by Dem Pilafian - here is the URL:

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

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消