DEKLED01 Member since 2008 4 posts
NTT Data
Posted: January 12, 2017
Last activity: February 2, 2017

SR-B13458 (Data URI base64 PDF not loading in Chrome)

I have a control which is creating an <embed> using data URI to display a base64 PDF in a screen. The PDF renders but only after refreshing the screen. The PDF display is not visible when switching tabs until refreshing the screen again. This works correctly in Firefox. Chrome version is 55.0.2883.87 m.


Steps to Reproduce
Create a control with this logic.
<div><embed id="previewframe" name="previewframe" src='<p:r n="$this-value" />' width="100%" height="400" type="application/pdf"></div>
Create a text property which references this control.
Create a section and use the property.
Sample base64 PDF is attached.
Error Message
Attempted Solutions
Used an iframe and referenced the PDF from ServiceExport folder, but this downloads the PDF to the client's machine. Due to the nature of the PDF contents, we don't want the PDF downloaded automatically when viewing. We also do not want the Users to have to change their browser settings.

***Updated by moderator: Lochan to add SR Exists group tag***

User Interface SR Exists
Moderation Team has archived post
Share this page LinkedIn