How to Print Document from Com. Lowagie. Text. Document
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...
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!