In theory, PD4ML should embed JPEG images to PDF “as is”, without a rendering in RAM. So the issue needs some investigations.
But first, I would try to unload the images from RAM to the temp dir:
[language=java:3p5iyqg7]Map m = new HashMap();
Does it change anything in your case?