Yes, you are right: there is a possibility PD4ML tries to close output stream twice, however we never faced with such kind of exceptions in our test scenarios.

We’ve just implemented a fix in the development build.

On the other hand we would recommend to use ByteArrayOutputStream as a receiver for generated PDF bytes and to send the buffer content to ServletOutputStream at once.