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 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
Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article