angularjs-pdf
angularjs-pdf copied to clipboard
Showing all pdf pages simultaneously
Is there any way to show all pages inline on a single load of the web page? I plan to show 3 pages pdf file showing 3 pages simultaneously
Hi, it's a long time since I used this component, but I think you have to do an ng-repeat for each page in your PDF, using, for example, something like <ng-pdf template-url="/partials/viewer.html" page="1"></ng-pdf>.
If the number of pages is fixed to 3, you can do this:
<ng-pdf template-url="/partials/viewer.html" page="1"></ng-pdf>
<ng-pdf template-url="/partials/viewer.html" page="2"></ng-pdf>
<ng-pdf template-url="/partials/viewer.html" page="3"></ng-pdf>
Keep in mind that is not memory optimized because every component perform a PDFJS.getDocument() call, when it would be better to make this operation once and then rendering only the pages.
To accomplish this you can read PDF.js documentation.