[.NET] Aspose.PDF remove images from header/footer

Hi guys,

in a project, we are using Aspose products. One of them Aspose.PDF.
Would you be kind to help me with this.

Next issue was found recently. Steps to reproduce are next:

  1. Create Word document, more than one pages
  2. Add an Image to the page header or footer
  3. Convert Word document to PDF
  4. Delete Images from PDF pages header or footer
  5. Save PDF

Actual result: Open result PDF in Acrobat reader, scroll down to 2nd page, Acrobat reader says next: “An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.”

Expected result: The document should be correct, without any errors.

Please, find the test project in attachment (Aspose.PDF version 17.9.0.0).
Please, add reference to your local Aspose.pdf and Aspose.Word dlls and Aspose.Total.Lic file.
ImageExtraction.zip (475.7 KB)

@yuzaitsev

Thank you for contacting support.

We have worked with the data shared by you and have noticed the code to be removing the image from first page only, because break statement does not allow second iteration of the loop. Therefore, removing the image from first page causes the error on second page for which a ticket with ID PDFNET-46403 has been logged in our issue management system for further investigations. We will let you know as soon as any further update will be available in this regard.

Moreover, you can test latest versions of the API in full capacity by applying a free 30-days temporary license. Once you complete evaluation process, you may purchase the license to keep using APIs features. In case you face any issue, please feel free to let us know.

Hi @Farhan.Raza,

thank you for the information.
Yes, when an image is placed in a page header/footer, the remove operation from the first page - removes it from all the pages.

Looking forward to hearing from you

@yuzaitsev

Thank you for the details.

We will let you know once any significant update will be available in this regard.

Hi @Farhan.Raza,

would you be kind to share any news about this one?
The described issue happens often, it would be nice to have a fix for it.

Looking forward to hearing from you

Thank you

@yuzaitsev

Thanks for your inquiry.

We regret to share that your issue is not yet resolved due to other high priority issues in the queue. Please note that the issue was logged under free support model where issues have low priority and are resolved on first come first serve basis. We will surely inform you as soon as we have some definite updates regarding issue resolution. Please spare us a little time.

We are sorry for the inconvenience.

Hi @asad.ali

thank you for your response. Looking forward to hearing from you about this one.