We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Document Size Issue

We are inserting some images in our word document with the following 2 ways in our application.
1. _builder.InsertImage(photoUrl, 273, 165);
here photoURL is a webURL either of a Google Map or a Photo uploaded on Amazon.
2. chart.ToImage()
here basically a chart is created (a specific size) and we create a image from it and show in the final word document.

Now the problem is, due to all these images our document size is getting increased a lot. If I open the document and Compress the pictures manually, the doc size reduces a lot.
But any idea how to do it before generating only?
Or anything else which can make the documents and Images smaller in size.

Please help as this is a critical issue in our Live Application.


Thanks for your inquiry. I have attached a sample project "CompressImages". Please try using that code and see if it works better.

Best regards,

Thanks for sharing the code.

I was getting few issues earlier as the documents we were using as templates were using .doc format but we have fixed the issue now and your code is working nicely.

The document size is getting reduced a lot without compromising the quality much.

Thanks a lot…!!!

Thanks for your feedback. It is great you were able to find what you were looking for. Please let us know any time you have any further queries.

Best regards,