How to get the total page count in PDF using JavaScript in AEM Guides
Hi,
Using the below code in page layouts, I tried to get the total page count of the PDF.
<span data-field="total-pages" data-format="default">1</span>
total page count is getting added in pdf. But can't able to fetch the value in JS. When trying to fetch the page count it's giving counter(pages) in console.
How to achieve this functionality?

