1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
540 views
by harold-r-4282 (120 points)
I am receiving a Base64 message and using Qvera to translate it to PDF and then save it to a network share.  However, I now want to print it to a network printer.  

I attempted to add importpackage awt to get dekstop, but it is erroring out saying cannot find.

1 Answer

0 votes

On a Windows PC using your default printer you can try something like this: 

var ff = new File("c:\\myTestTemp.txt");
var desktop = java.awt.Desktop.getDesktop();
desktop.print(ff);

by michael-h-5027 (14.8k points)
edited by michael-h-5027
...