> Does PD4ML set the content length?

Of course, yes. PDF is binary data, so it always makes sense to set it.

The problem, you faced with, most probably caused by an undesired text encoding conversion, applied to PDF bytes. For example Latin-1 to UTF-8 – that explains why the actual data amount has grown. Obviously UTF-8 became a default file encoding after you upgraded to Oracle 11g.

What to do?
1. Try to run Oracle with file.encoding set to the same value as it was in previous installation
2. If #1 is not possible, try to add encoding=”UTF-8″ or encoding=”default” attribute to

Also there are 3 new line characters before – they will be sent before PD4ML started to send PDF bytes. It is a good idea to remove them.