Sidebar

How can I print a Base64 to a Network Printer

0 votes
276 views
asked Dec 10, 2020 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);

answered Dec 10, 2020 by michael-h-5027 (14,350 points)
edited Dec 10, 2020 by michael-h-5027
...