Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PDFJs Viewer.html into a div

Does anyone know if viewer.html from pdf.js (http://mozilla.github.io/pdf.js/web/viewer.html) can be placed inside a <div>?.

Or better yet, converted to an AngularJs directive (I know there are a couple of pdfjs directives for Angular, but none of them has the quality of viewer.html).

like image 354
leonardorame Avatar asked Jun 26 '15 19:06

leonardorame


1 Answers

Put your src of pdf file in iframe like this :

<div><iframe src="/pdfjs/viewer.html/{src of PDF file}" style="position: relative;   top: 0;  bottom: 0; left: 0;   width: 100%;   height: 700px;  border: 0"></iframe></div>

it may help you

like image 171
Hùng Trần Avatar answered Sep 22 '22 20:09

Hùng Trần