Remove Empty Pages works with Word but not with PDF

Hi,

We are using Aspose.Words 16.2
We implemented the logic in This Thread to remove empty pages (Pages with page break only)
When saving as “.docx” it is working just fine
But, saving as “.pdf” generates the same source file “With blank page”

Attached is a sample project.

Regards,
ECAS Team.

Hi Saeed,

Thanks for your inquiry. Please call Document.UpdatePageLayout method before saving the Pdf file to get the desired output.

doc.UpdatePageLayout();
doc.Save("Committee-PDF Out.pdf", SaveFormat.Pdf);

Hi Taher,

Thanks for the reply.
The issue is now solved.

Regards,
ECAS Team