I am trying to obtain the total Pages that my PDF file has when its opened in a tag.
When I press the menu --> Document Properties it shows me information from the document and one of it is the Total pages: [Document Properties][1] [Total Pages][2]
Also it shows in the 1/n pages selector. [Page Selector ][3]
I was trying to read the input id that has the total value, but I am not able to run the code after it finish loading the file.
let totalPages = document.getElementById("pagelength");
And when adding the onload tag on the I am getting that there is no definition of that function.
<object #pdfview [data]='pdffile' type="application/pdf" width="100%" height="100%" onload="cargue()" >
[No definition Image][4]
Its there a way to get that number? I am currently using Angular 17. [1]: https://i.stack.imgur.com/A1v09.png [2]: https://i.stack.imgur.com/e3clr.png [3]: https://i.stack.imgur.com/1gEMq.png [4]: https://i.stack.imgur.com/tkCKS.png