Bug Report or Feature Request (mark with an x
)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [X ] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
StackBlitz Reproduction
https://stackblitz.com/edit/ng2-pdf-viewer-bwntrw?devtoolsheight=33&file=src/app/app.component.ts
Two way page binding for always showing pdf last page is throwing console.error while executing correctly. ¿Why is the error showing and is there any way I could prevent this from happening? It seems scrollIntoView method somehow losses pdf pages array.
That’s not a bug.
(after-load-complete)
is called immediately after loading the document. At this point in time, the document hasn’t been rendered yet. So there are exactly zero pages. That’s why settingpage="3"
raises an error.You can add a timeout, or you can also implement
(text-layer-rendered)="jumpToLastPage($event)"
like so: