The OptimizeResourse() method provides the capabilities to compress/optimize PDF file size. Also please note that in recent release versions, we have made numerous improvements in this method. Can you please try using the latest release and in case the problem sill persists, please share the resource PDF file. We are sorry for your inconvenience.
I have already tried with the suggested code sample and I am not able to compress the pdf file. I am having Aspose.pdf 7.2 and I need this to work with this version only.
Thanks for your feedback. We will appreciate it if you please share your sample PDF file here, we will test the scenario at our end and will provide you information accordingly.
Moreover, please not that we maintain a single code base of Aspose Components, so all the fixes and new features/enhancements are implemented in latest version of DLL. We will be unable to provide a hotfix for any old version so we always recommend customers to use latest versions.