Open
Description
We have PDF blobdata and that is assigned to PDFViewer as below and that is used to preview PDF file but that PDF file is displaying as blank and when we try to select on it, it seems some data is present. So, some styles are overridden in PDF viewer. If we try to download that PDF file from PDF Viewer, then also PDF file is displayed correctly.
```
var binaryImg = atob("@PDFBLOBDATA");
var length = binaryImg.length;
var arrayBuffer = new ArrayBuffer(length);
var uintArray = new Uint8Array(arrayBuffer);
for (var i = 0; i < length; i++) {
uintArray[i] = binaryImg.charCodeAt(i);
}
console.log("Ln 951");
var currentBlob = new Blob([uintArray], { type: 'application/pdf' });
url = URL.createObjectURL(currentBlob);
this.pdfMisuraSrc = url;
this.misuraPdfViewer.pdfSrc = url; // pdfSrc can be Blob or Uint8Array
this.misuraPdfViewer.downloadFileName = this.misuraDocumentResponse.FileName;
this.misuraPdfViewer.refresh();
<ng2-pdfjs-viewer #misuraPdfViewer [viewBookmark]="true" [downloadFileName]="misurafilename"
Metadata
Metadata
Assignees
Labels
No labels