angularjs-pdf icon indicating copy to clipboard operation
angularjs-pdf copied to clipboard

Showing all pdf pages simultaneously

Open MShirazAhmad opened this issue 5 years ago • 1 comments

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

MShirazAhmad avatar Sep 25 '20 12:09 MShirazAhmad

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.

dennybiasiolli avatar Sep 25 '20 12:09 dennybiasiolli