ngx-extended-pdf-viewer: can't visualize pdf using the ngIf element
Dear developers, i was trying to visualize the pdf image using angular 7 with this part of code in html page:
<div *ngIf="floorInfo">
<ngx-extended-pdf-viewer src ="'/assets/' + floorInfo.image">
</ngx-extended-pdf-viewer>
</div>
there is no errors, so i do not know what is wrong with the code, but i can see only gray screen of the pdf viewer and the control buttons located in the wrong way on it and no image. I tried with the static image and everything was working fine, but i need the image to be loaded dynamically based on the selection of the user. Any idea what am i doing wrong? Any suggestion is appreciated. Thanks in advance, Liudmila
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (10 by maintainers)
Hi Stephan, thanks for the suggestion, looks like it was the problem of the import of the library in wrong module, since the html, i was talking about ,is a one of the several components on the screen, the import have to be defined on the parent module. Anyway, with the correct import and putting the square brackets now i can see it. Another issue i discovered though, is what once it is visualized, the overall page Zoom in and out working only for the pdf viewer, looks like focus remain on it forever. Resizing the browser window all components are reduced/increased correctly, only zooming is not working as i would expect. Is there any way to disable it somehow? Thansk again