How to get the number of pages that will print out?

Before we print out a generated PDF to the screen, we want to check how many pages it has and display a warning if it will be over a certain number of pages.

Is there a way to get the number of pages that will print out before I do pdf.Save(…)?

Thanks,

Edward

Dear Edward,

Thank you for considering Aspose.

Pages is rendered inside the pdf.Save(…) method. So before Save it’s not possible to get the number of pages.