Dansoftowner / PDFViewerFX

A pdf viewer library for your javaFX application
Apache License 2.0
66 stars 24 forks source link

PDF not displaying with the error "An error occurred while rendering the page" #1

Closed Gopalakrishna-Kini-K closed 4 years ago

Gopalakrishna-Kini-K commented 4 years ago

I tried using the PDFDisplayer just as described in the Readme instructions. I have used the different options, "File", "InputStream", yet I get the same error. The error message which I get after clicking "Learn more" button in the rendered is as follows PDF.js v2.2.228 (build: d7afb74a) Message: window.requestAnimationFrame is not a function. (In 'window.requestAnimationFrame(function () { _this17._nextBound()["catch"](_this17.cancel.bind(_this17)); })', 'window.requestAnimationFrame' is undefined) Stack: _scheduleNext@jar:file:/./.../..../..../fxpdf-0.5.jar!/pdfjs/build/pdf.js:12158:39 _scheduleNext@[native code] renderContinueCallback@jar:file:/./.../..../..../fxpdf-0.5.jar!/pdfjs/web/viewer.js:12000:15 onContinue@jar:file:/./.../..../..../fxpdf-0.5.jar!/pdfjs/web/viewer.js:12181:34 _continue@jar:file:/./.../..../..../fxpdf-0.5.jar!/pdfjs/build/pdf.js:12147:31 operatorListChanged@jar:file:/./.../..../..../fxpdf-0.5.jar!/pdfjs/build/pdf.js:12135:23 jar:file:/./.../..../..../fxpdf-0.5.jar!/pdfjs/build/pdf.js:10620:47 run@jar:file:/./.../..../..../fxpdf-0.5.jar!/pdfjs/build/pdf.js:3175:29 jar:file:/./.../..../..../fxpdf-0.5.jar!/pdfjs/build/pdf.js:3196:10 flush@jar:file:/./.../..../..../fxpdf-0.5.jar!/pdfjs/build/pdf.js:3650:11-

Please note that the external window with all the options like "zoom, find" etc are getting rendered correctly. Even the page numbers are accurate. Just the pdf is not getting displayed.

I am using Java8

Please let me know if you need anything more.

Gopalakrishna-Kini-K commented 4 years ago

The issue got fixed, but updating my jdk to java 8_241. Thanks to this : https://stackoverflow.com/a/46471071