ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.
One of a set of tools we're offering as a way to say thank you for being a part of the community.
You also could (try to) hook into a print dialog but the data actually sent to a printer maybe graphical data as well as text data, it even could be raster points if you have no luck.
No, capturing printing data is not really a good method (beside you only want to prevent from printing).