lazyloading for ng2-pdf-viewer in Angular 14

257 Views Asked by At

I am loading a pdf contains 16 pages using ng2-pdf-viewer updated version(9.1.5) in Angular 14. I want to use lazy loading for this PDF, what are the concepts I need to do.

I used the thumbnail image before loading PDF, once the pdf is loaded, the thumbnail image is hidden and the pdf should be visible. Is this the correct method or not?

1

There are 1 best solutions below

0
On

Yes, that's the correct way, set up "after-load-complete" event as shown in the official docs.

Alternatively, you can use "on-progress" event in order to show progress bar.