Thanks for your interest in our products.
The Document class present in Aspose.Pdf namespace is used to Create as well as manipulate existing PDF documents. It also contains a method named OptimizeResources(); which optimizes the PDF files size by eliminating/removing resources which are not being used, equal resources are joined into one object and unused objects are removed. This method is more useful when document contains objects like text etc. However in your current scenario, you are using scanned PDF files for which I am not sure if this method will have any affect. Can you please try using our product and in case you face any issue, please feel free to contact.