ng2-pdfjs-viewer

How to display empty ng2-pdfjs-viewer when no file provided

故事扮演 提交于 2019-12-24 00:45:33
问题 I'm using ng2-pdfjs-viewer to display pdfs in my angular page: <ng2-pdfjs-viewer [pdfSrc]="src"> </ng2-pdfjs-viewer> Behavior : i get src from server, when it's not empty or null it's working correctly, but when null or emty ng2-pdfjs-viewer crashes. Expeced : display an empty ng2-pdfjs-viewer when src is null or empty (or a loading indicator inside) 回答1: Put *ngIf with this component. It will solve null or empty src case. <ng2-pdfjs-viewer *ngIf="src" [pdfSrc]="src"> </ng2-pdfjs-viewer> 来源:

PDFJS: Text layer rendering twice

有些话、适合烂在心里 提交于 2019-12-11 08:12:01
问题 Here's the context: pdfjs-dist: v2.2.228 angualar/core: 8.2.0 (hybrid Env with an AngularJs 1.5.X) Objective : to upgrade pdfjs-dist to the latest versions (2.3.200 or at least 2.2.X) I upgraded from pdfjs-dist 2.0.4xx, and here's what is being rendered: So basically, instead of having the PDF rendered correctly, with highlightable text and so on, there's like a duplicate of the text: one version of the text is rendered correctly (graphically), the other version seems to work OK for text