Question

1
Replies
663
Views
RITESHC2 Member since 2013 1 post
COGNIZANT TECHNOLOGY SOLUTIONS
Posted: 3 years ago
Last activity: 3 years 6 months ago
Closed

Issues on showing a embedded pdf file inside a html rule in a section . "Only secure content is displayed " error message is coming in browser.

We have a requirement to display a pdf file embedded inside a html rule in a section in our application . The approach I tried is :

  • First generate the pdf file from user input and save it in a temporary location.
  • Retrieve the pdf file from the html rule using <iframe> tag . The code is

String imageSource = "<iframe src ='" + fileLocation + "'" + " width='" + width + "' height='" + height + "' ></iframe></html>";

tools.appendString(imageSource);

During runtime, when the application is trying to display the section containing the pdf , the browser is showing a warning message "Only secure content is displayed " . On clicking ShowAllContent button , the browser is getting reloaded with all the details deleted .

I have gone through few forums regarding this . There I found some posts which states using "pdf byte array using the OOTB activities like HTMLtoPDF or Code-Pega-Pdf View activity" .

Someone please explain me on how to use these OOTB activities to display the byte array (pdf content) in the HTML section .

User Interface
Moderation Team has archived post
Share this page LinkedIn