I found a Java printing example here.
Unfortunately, trying to execute I got a exception
Exception in thread "main" sun.print.PrintJobFlavorException: invalid flavor
at sun.print.Win32PrintJob.print(Unknown Source)
at application.UsePrintingServiceInJava.main(UsePrintingServiceInJava.java:55)
I also tried to print a png using DocFlavor.INPUT_STREAM.PNG
flavor instead of the pdf, this works fine. May there be a problem with the printer itself or do I have to change the code?
Moreover, if you have got a better solution to print a PDF file in Java, let me know.