x)- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
@akarai9 Have you tried ng2-pdf-viwer version 5.1.0? Does it work there?
@VadimDez No i have not tried version 5.1.0 yet.
@VadimDez No its not even working in ng2-pdf-viwer version 5.1.0
Can confirm this is still happening in 5.1.1. I'm trying to open a large PDF that takes about 10 seconds to open. I never get anything coming through on-progress.
component.html:
<pdf-viewer [src]=pdfSrc [render-text]="true" [show-all]="true" [fit-to-page]="false" [zoom]="zoom" [autoresize]="true" [original-size]="false" (on-progress)="onProgress($event)"></pdf-viewer>
component.ts:
onProgress(progressData: PDFProgressData) {
console.log(progressData.loaded, progressData.total);
}
The console never outputs anything.
Same - (on-progress) never calls back. I'm using 5.1.1.
I'm trying to use that event to decide when to disable buttons for scaling in/out while re-rendering is occurring. When using my scaling buttons to adjust scale too quickly (so while there is still a loading indicator shown in the viewer) causes a js error. But I cannot rely on the (on-progress) event to notify me of progress to check that situation in order for me to disable my buttons while it is re-rendering.
Any news on this? I'm on 6.3.0 and the on-progress isn't triggering
My code
onProgress(progressData: PDFProgressData) {
console.log('test OnProgress')
this.pdfHandler.progress.current = progressData.loaded
this.pdfHandler.progress.total = progressData.total
let percent = (progressData.loaded / progressData.total) * 100
this.pdfHandler.progress.percent = (percent >= 100) ? 100 : percent
}
and nothing shows on the console.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Can confirm this is still happening in 5.1.1. I'm trying to open a large PDF that takes about 10 seconds to open. I never get anything coming through on-progress.
component.html:
<pdf-viewer [src]=pdfSrc [render-text]="true" [show-all]="true" [fit-to-page]="false" [zoom]="zoom" [autoresize]="true" [original-size]="false" (on-progress)="onProgress($event)"></pdf-viewer>component.ts:
The console never outputs anything.