Reputation: 14274
I need to load and display a PDF in an ASP.NET/Javascript application and detect when the user has scrolled to the bottom and trigger some javascript function at that point. What would be the best way to implement this?..
Thanks in advance
Upvotes: 1
Views: 1345
Reputation: 99694
Here is a better alternative, Put some text at the end of the PDF, like a code. Make them enter that code into a textbox. Or even better, why use a PDF at all? Just output the text directly on the page. If a PDF is a must and it cannot be changed, I remember the anti-piracy scheme with my old video games was to enter the X word on the Y page in the Z paragraph. I still have my original Warcraft manual.
While exactly what you want to do is somewhat possible, it will be very brittle and error prone. Don't do it. You would be alienating your non javascript users (not that there are that many) but even worse, making this reliably cross browser and cross OS will be a pain in the ass.
Upvotes: 4