Yesterday I have tried Aspose Words for Java Version 10.1.0.
After inserting 3 images, the saved result document gets a size of ~35MB.
If I use Version 10.0.1 with the same input as above, the result document size is only ~1,2MB.
My image insert code is:
byte imageData = (byte) patternResultList.get(i);
builder.insertImage(imageData, width, height);
Is there a change in the new version?
Thanks for your
inquiry. Could you please attach your input document and images here for
testing? I will check the problem on my side and provide you more information.
Sorry for the late reply.
Here more information about the problem:
Doc and Docx creation work fine.
Only RTF files have the reported problem.
RTF that are created with 10.0.1 include the pictures 2 times (why?). If the picture blocks are compared, they where exactly identical. The document becomes larger (depending on the picture size) than a created Doc-File, but not as big as the documents created with a version > 10.0.1.
The attached sample document after creation:
14,8 MB (10.0.1) (RTF)
3,7 MB (10.0.1) (DOC)
43,7 MB (10.3.0) (RTF)
3,7 MB (10.3.0) (DOC)
I attached a sample document and sample picture.
Thank you for additional information. Please try saving the output DOC to RTF using MS Word. Then try comparing the MS Word document with the document produced by Aspose.Words, you will see the size of MS Word RTF is bigger than Aspose.Words RTF. So I think it is expected behavior in case of using RTF format.
Tank you for the answer.
You are right, if I save the created doc file to rtf with word (I use Word 2007), the size is bigger (7,5 MB).
If you save the created doc file with word to rtf, is the size the same compared to the document you create with aspose words?
Do you have any idea why the rtfs created with a version > 10.0.1 so much bigger than the ones created with 10.0.1?
Thank you for additional information.
1. Marktwertreport.rtf + Terrasse2.JPG using MS Word 2007 = RTF size – 38 MB
2. Marktwertreport.rtf + Terrasse2.JPG using Aspose.Words 10.3.0 = RTF size – 21 MB
It seems the reason of the differences between two versions is that the version 10.0.1 has some known issues related to processing of images. Aspose.Words 10.3.0 includes lot of improvements in document conversions and rendering.