Skip to content

PDF viewer displays blank page #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
NLPrasanna999 opened this issue Apr 22, 2025 · 1 comment
Open

PDF viewer displays blank page #269

NLPrasanna999 opened this issue Apr 22, 2025 · 1 comment

Comments

@NLPrasanna999
Copy link

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.

Image

           ```

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"

@NLPrasanna999
Copy link
Author

Identified that if a pdf document contains "Monospace" font family, then getting blank in pdf file. Is there any known issue regarding "Monospace" font family ?

Is this type of issue fixed in any latest version of ng-pdfjs-viewer version ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant