webodf / ViewerJS

ViewerJS: Document Reader in JavaScript
http://viewerjs.org
1.94k stars 421 forks source link

AJAX load a PDF into a DIV #70

Closed isarmstrong closed 9 years ago

isarmstrong commented 10 years ago

Instead of using iFrames to view PDF content, I'd love to use a scrollable DIV. As far as I can tell, the scripts you use would support this but it wold take a lot of modification. Is this something you've played around with? Or am I asking for a unicorn for Christmas again?

vandenoever commented 10 years ago

On 07/22/2014 12:44 AM, Ian Armstrong wrote:

Instead of using iFrames to view PDF content, I'd love to use a scrollable DIV. As far as I can tell, the scripts you use would support this but it wold take a lot of modification. Is this something you've played around with? Or am I asking for a unicorn for Christmas again?

It is possible to use a scrollable div with WebODF and also with PDF.js. In Viewerjs, we chose to use iframe to make the common usecase straightforward for users. So using

instead of