See the attached demo project, which throws the following exception:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at #=zRfa24k6qRV51vWOnVLP8VICdg7c7CNQNesY…...NullReferenceExcepti in Document.OptimizeResources Aspose.PDF...#=z7nIVpLE=) at Aspose.Pdf.Document.OptimizeResources(OptimizationOptions...