I'm trying to print a Primefaces dataTable with a button at the top of the datatable. I started with the functionality, but I only end up with the rows currently displayed on the page being printed (which I have learned is the expected behavior). I then had what I thought at the time to be a great idea. I would use a postProcessor on the Create PDF functionality, send the PDF to the printer, and then kill the process before the user is prompted to save the file.
Now I'm stuck. I can't figure out how to go from com.lowagie.text.Document (which is what I have access to in the postProcessor method) to being able to actually send that PDF to the printer. If I could find a cleaner way that just prints the entire dataTable, that would be amazing. Unfortunately, I suspect that isn't going to happen, as I've been looking for such a solution for two days with no luck.
Can anyone help?
Thanks in advance!
5 Related questions 6 How to print PDF file in a Java application? 0 PDF printing in java 1 How to print documents using Java? Related questions 6 How to print PDF file in a Java application? 0 PDF printing in java 1 How to print documents using Java? 2 How can i print pdf file in Java Swing 1 Create pdf through java.io 19 Print a PDF file using PrinterJob in Java 3 print pdf with java 1 Print client-side PrinterJob 4 Printing pdf files using java 0 How to print PDF File in Java with Print Dialog Load 7 more related questions Show fewer related questions Reset to default