Ng2-pdf-viewer: Single page pdf are never displayed

Created on 2 May 2018  路  3Comments  路  Source: VadimDez/ng2-pdf-viewer

Bug Report or Feature Request (mark with an x)
- [ x] Bug report -> please search issues before submitting

Hello,
I've a problem to display a single page pdf. All works fine with a multiple pages pdf but for single page pdf, the event (page-rendered) is never triggered. Moreover the (onError) event is not triggered either.
This strange behaviour appears for 10 days, before that the render worked. I tried to update ng2-pdf-viewer but behaviour is the same
Anyone can help me ?

Most helpful comment

Multi-page PDF's don't seem to be working for me either - both single and multi-page show white-boxes with infinite loads.
Neither trigger onProgress() or onError() either.

EDIT: It appears the after-load-complete successfully triggers the callback. I'll try finding out why the PDF's aren't being displayed.

All 3 comments

Multi-page PDF's don't seem to be working for me either - both single and multi-page show white-boxes with infinite loads.
Neither trigger onProgress() or onError() either.

EDIT: It appears the after-load-complete successfully triggers the callback. I'll try finding out why the PDF's aren't being displayed.

I'm experiencing the same issue (single page pdf not rendering / multi-page pdf rendering). It turns out that in my case this is related to the position of the element relative to the top of the page. If the element is more than 1132px from the top, the pdf won't render.
@UlricW could you confirm that you're experiencing the same issue? Here's a sample to reproduce:

<div style="height:1133px;"></div>
<pdf-viewer [src]="previewDocumentSrc"></pdf-viewer>

Yes you鈥檙e right.
I didn鈥檛 have time to post the solution before but this is due to the size. We have a dynamic component with multiple lines and if the component鈥檚 heigt is too big thumbnails are never displayed above the component.
Thanks for your experience sharing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Gianlu82b19 picture Gianlu82b19  路  4Comments

akarai9 picture akarai9  路  7Comments

yashwanth493 picture yashwanth493  路  7Comments

sabarinathancs picture sabarinathancs  路  4Comments

kuba007 picture kuba007  路  3Comments