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

Free Support Forum - aspose.com

Header and footer missing in PDF after calling OptimizeResources();


We recently tried to optimize PDF generation using Aspose and found two methods from your documentation.

  1. Optimize();
  2. OptimizeResources();

While using OptimizeResources() with the Document object, it removed all the headers and footers from every page in our PDF.

Please confirm if there is a specific way to use these methods or it is an issue

Also confirm if there are any other ways to optimize PDF generation time.

Thank you.


PDF optimization is not supposed to remove the headers and footers. Can you please share the source file along with generated PDF and used sample code reproducing the issue. Moreover, the documentation article already covers all details related to optimization.