0

I want to show a document generated from base64 in my web, but throws this error and doesn't display anything. There's no error in the controller, this message shows in the browser (Chrome):

Uncaught Error: Assertion failed at assert (pdf_viewer_wrapper.js:5) at Viewport.getPageAtY_ (pdf_viewer_wrapper.js:16) at Viewport.getMostVisiblePage (pdf_viewer_wrapper.js:16) at HTMLElement.updateUIForViewportChange (pdf_viewer_wrapper.js:2241) at HTMLElement.viewportChanged_ (pdf_viewer_wrapper.js:2091) at Viewport.viewportChangedCallback_ (pdf_viewer_wrapper.js:2091) at Viewport.updateViewport_ (pdf_viewer_wrapper.js:16) at pdf_viewer_wrapper.js:16 at Viewport.mightZoom_ (pdf_viewer_wrapper.js:16) at Viewport.fitToNone (pdf_viewer_wrapper.js:16) 

Frame for document: <iframe id="framePDF2" frameborder="0" style="width: 100%; height:900px;" src=""></iframe>

JQuery to obtain base64 from controller:

success: function (result) { $('#framePDF2').attr('src', "data:application/pdf;base64," + result.pdf); } 
2
  • Are you sure it is a properly encoded base64 string of a PDF? Commented May 10, 2021 at 17:10
  • @pcisrra76, as others said, we can not know if your base64 string is correct. It will be better for you to provide the code related to how do you get the base64 string. Commented May 11, 2021 at 7:23

1 Answer 1

1

I don't have an answer, but since a few weeks I have the same issue on a website in Chrome Browser (Versie 90.0.4430.212 (Officiële build) (64-bits, Windows 10) with a webpage which isn't changed and worked fine before. In Edge no problems. For me it seems to be a Chrome-bug

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.