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


#1

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


#2

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.