plasma-umass / doppio

Breaks the browser language barrier (includes a plugin-free JVM).
http://plasma-umass.github.io/doppio-demo
MIT License
2.16k stars 174 forks source link

PrintServiceLookup is not working in Doppio #505

Open santha6693 opened 6 years ago

santha6693 commented 6 years ago

PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null); System.out.println("Number of print services: " + printServices.length); for (PrintService printer : printServices) { System.out.println("Printer: " + printer.getName()); } While Executing the above code the doppio through the following Exception.

java.lang.UnsatisfiedLinkError: Native method 'sun.print.CUPSPrinter.initIDs()Z' not implemented.

jvilk commented 6 years ago

Looks like we need to stub some printer-related native methods to act as if no printers exist. I'll accept pull requests that implement these.

santha6693 commented 6 years ago

Even Printer is connected also the Exception is Throwing.

Can you please tell me how to send the text file to Printer using Doppio.

jvilk commented 6 years ago

Doppio does not currently support printers, and we do not have plans to add support.

To add printer support, I imagine someone would need to write or compile a printer driver to JavaScript that produces postscript or a PDF, and instruct the browser to print it.

(I'm happy to accept any pull requests moving us in this direction, but cannot commit any resources to it myself.)