javascript - get current page and total page for pdf in an iframe - pdf.js -


the pdf viewer pdf.js has built in show current page out of total pages:

https://mozilla.github.io/pdf.js/web/viewer.html

i have pdf embedded on page within iframe.

is possible use on page that

<div id="counter"></div> 

is filled same information of currentpage / totalpages , if current page isn't possible, totalpages count satisfactory fallback.

i tried accessing id of iframe, getting cross-domain rejections.

host viewer on web site not receive cross-domain rejection -- these rejections browser protection , not able circumvent them. once it's on same domain, can access iframe's contentwindow , pdfviewerapplication object.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -