Is it possible to print a file (txt, image, pdf, ...) to a printer using its path?
For example:
I have a file in C:\directory\file.txt
. Can I give this path to java and launch a print command to printer?
Is it possible to print a file (txt, image, pdf, ...) to a printer using its path?
For example:
I have a file in C:\directory\file.txt
. Can I give this path to java and launch a print command to printer?
try this
String file_path = "C:\directory\file.txt"
Desktop.getDesktop().print(new File(file_path));