2nd PDF page is blank
bfredo123 opened this issue · 1 comments
Bug Report or Feature Request (mark with an x
)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [ X] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
Hi,
I am using version 9.1.5. With a 1-page document, everything works fine. But when the document gets a bit longer and has a 2nd page, then the text does not show up on page 2, and I see these warnings in the browser console:
Warning: Unknown command "#ffffff".
pdf.worker.min.js:22 Warning: getOperatorList - ignoring errors during "GetOperatorList: page 1" task: "TypeError: Cannot read properties of null (reading '0')".
Attached an example file causing this issue (it appears correct, with 2 pages, but again the 2nd page is blank when rendered by ng2-pdf-viewer).
Below is my angular code:
<pdf-viewer [src]="documentData" [render-text]="true" [original-size]="false"
style="width: 90%; height: calc(90vh - 90px)" [(page)]="documentPreviewPage"
(after-load-complete)="pdfLoaded($event)"
[original-size]="true" [fit-to-page]="true" [show-borders]="true"></pdf-viewer>
Please note that the (error) event does not trigger, here is the console output:
debug on-progress {loaded: 21657, total: 21657}
debug on-progress {loaded: 21657, total: 21657}
debug on-progress {loaded: 21657, total: 21657}
debug page-initialized {source: PDFViewer}
debug page-rendered {source: PDFPageView, pageNumber: 1, cssTransform: false, timestamp: 2702646, error: null}
pdf.worker.min.js:22 Warning: Unknown command "#ffffff".
pdf.worker.min.js:22 Warning: getOperatorList - ignoring errors during "GetOperatorList: page 1" task: "TypeError: Cannot read properties of null (reading '0')".
debug page-rendered {source: PDFPageView, pageNumber: 2, cssTransform: false, timestamp: 2702671.600000024, error: null}
Can you please help me understand what is wrong and fix it?
Many thanks!
Hi, please disregard this issue, the bug was on my side, a wrong use of PDFkit.
Note sure, but I still think there is something strange on fillColor management when a new page is added, if it may help around.