#29223

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:
[language=java:3bo2snuj]sr.setContentLength(result.length);
ServletOutputStream sos = sr.getOutputStream();
if ( this.getEncoding() != null && this.getEncoding().equals(“default”) ) {
sos.write(result);
} else {
sos.print( new String( result, “ISO8859_1” ) );
}
sos.close();[/language:3bo2snuj]

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.