It seems the binary PDF document data is corrupted. Usually that happens by a HTTP transfer, when an undesired character encoding conversion is applied to a binary PDF document.

In PD4ML JSP taglib byte[] result PDF data is sent 2 ways:
ServletOutputStream sos = sr.getOutputStream();
if ( this.getEncoding() != null && this.getEncoding().equals(“default”) ) {
} else {
sos.print( new String( result, “ISO8859_1” ) );

Try both in your Tomcat app.

Another more rare reason of such corruption is a replacement of UNIX-style new line characters with Win-style double chars. The problem may happen, but it is quite unlikely to face with in web scenarios.