Reputation: 131
I am integration ng2-pdf-viewer in angular 17. I am passing base64 string with starting data:application/pdf;base64,content. I am getting below error. Please advise PDF.js v2.2.171 (build: c8c937c2) Message: PDFDocument: Stream must have data undefined
;
<ng2-pdfjs-viewer [pdfSrc]="pdfSrc" style="display: block;">
</ng2-pdfjs-viewer>
this.pdfSrc = ${'data:application/pdf;base64,'}${pdf}
Upvotes: 0
Views: 218