I would look into IText, its a java based PDF writer, I've used it on some projects to allow you to format and write data to a java file and store it in a specific place. Your new button could write the pdf file then open it for printing.
Thanks
-Toby