开发者

How can i print pdf file in Java Swing

I want to like after click a JButton will directly pop out a printer window to print the pdf f开发者_如何转开发ile no need to show the file, is it possible?


Multiple ways to do it ,

  1. You can get access to printers installed, this requires how the printers are configured etc and then you require some print plugin to write it to pdf file.

  2. Else you can use plenty of java pdf libraries available to do the pdf creation part too


See Desktop.print(File).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜