0

I'm about to embed a .pdf file in a HTML document and I want the surrounding frame to change to a specific color for each page the user scrolls by.

The document loads at page 1 and the javascript should return '1' - Then the user scrolls down to page 2 and the javascript should return '2'

I'm quite sure Adobe's Reader plugin is not capable of this and I can't seem to find any documentation for eg. PDF.js that describes such a function.

The question has been answered for #C earlier so I'm pretty sure it must possible with javascript to.

Ulrik Pedersen
  • 73
  • 1
  • 12
  • If I understand the PDF.js documentation that answer referes to opening a specific page in a PDF file - not returning the current pagenumber when scrolling. Please correct me if wrong. – Ulrik Pedersen Aug 11 '15 at 13:37
  • If you end up going with pdf.js take a look at the pdf_viewer.js sample. The current page is the visible page. https://github.com/mozilla/pdf.js/blob/c42613b9110a332fc8028f263ae73380ec8272ca/web/pdf_viewer.js#L127 – Rowan Aug 16 '15 at 19:17

0 Answers0