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

Free Support Forum - aspose.com

OptimizeResource takes a lot of memory!

Hello,
I’ve a pdf file quite huge (270MB) , when doing a document.Optimize() the used memory increase a lot, where a lot is 7GB … was wondering why this happens… I’ve used the 9.1.0.0 version of Aspose PDF (the document has around 3000 pages)

Any suggestion?

Hi Paolo,


Thanks for your inquiry. Aspose.Pdf uses memory instead disk space for its internal processing and memory consumption depends upon contents and size of the files along with operation. We will appreciate if you please share your sample file, so we will investigate it and will provide you more information accordingly.

We are sorry for the inconvenience caused.

Best Regards,


P.S: You may share your sample file via some file sharing services,e.g. skydrive, dropbox etc.

Hello,
I’ve investigated further and what tooks a lot of time is the RemoveUnusedStreams

new Document.OptimizationOptions { LinkDuplcateStreams = false, RemoveUnusedObjects = false, RemoveUnusedStreams = true } //memory expolodes!

I’ve to ask for sharing the file since it contains sensitive data… meanwhile I’ve to signal you that this Optimization doesn’t remove duplicate unused fonts… wasn’t it supposed to do?
Thanks

pponzano:
Hello,
I've investigated further and what tooks a lot of time is the RemoveUnusedStreams

new Document.OptimizationOptions { LinkDuplcateStreams = false, RemoveUnusedObjects = false, RemoveUnusedStreams = true } //memory expolodes!

Hi Paolo,

Thanks for your investigation. We will look into in detail as soon as we get your sample document.

pponzano:

I've to ask for sharing the file since it contains sensitive data... meanwhile I've to signal you that this Optimization doesn't remove duplicate unused fonts... wasn't it supposed to do?
Thanks


Moreover, in reference to remove unused fonts please check following documentation link it will help you to remove duplicate unused fonts.



Best Regards,