I'm trying to print documents of type .docx (optionally if you can also in .doc or .pdf). The files are generated by a program in java , and this saves them in a specific folder. I have this fragment of code that although it fulfills the function of printing I see it limited.
File doc = new File("c:\Documentos\prueba.docx");
Desktop.getDesktop().print(doc);
The code sends to print by means of Word (in Windows) which opens and executes the print action and then closes. What I want is for a window to appear to be able to select the printer to use from several that I have connected to my network.
Note: Consider using Linux with LibreOffice on the server, so using some dll
would complicate things.