PDF file not displayed in iframe present in freshdesk full page and Modal

Hi Team,

We have a requirement in which we need to display the pdf and video file in modal and freshdesk full page app.

The PDF and video file will be fetched from AWS S3 Bucket using cloudfront distribution.

Video file has been successfully displayed but pdf file isn’t.

The Iframe shows error as “This page has been blocked by chrome” and in console the following error is displayed “crbug/1173575, non-JS module files deprecated.”

We have also enabled the CORS policy in S3 Bucket.

Please find the code we used to display the pdf file

     doc_name = doc_name_array[6].docName;
     doc_aws_cf_url = "https://aaaaaaaaaaa.cloudfront.net/" + doc_name;
     var doc_frame = document.createElement("iframe");   

      doc_frame.setAttribute("src", doc_aws_cf_url);
      doc_frame.width = "640px";
      doc_frame.height = "480px";       

      const box = document.getElementById('doc_div');
      box.appendChild(doc_frame);

Please find the screenshot below for reference.

Looking forward for the solution.

Thanks,
Suman C.

Hi @Suman_Chinnaraju, thanks for bringing out this issue to use. Can you please share more about the use case - in which cases do you need to display a PDF?
For example, is this a step by step guide or tutorial?

HI @Utkarsh_Singh,

The Main aim is to display a pop up modal in which either video or document and a set of questions will be present.

The Agent supposed to either watch the video or read the document present in the modal and the answer all the questions present in the Modal.

Thanks,
Suman C.

Thanks for sharing these details, Suman. This helps us understand the requirement and prioritise better.

Hi @Suman_Chinnaraju

You can try Adobe Embed API to do so.
You will have to create an API credential which requires the domain name. You should use iframe source URL which in case of Freshworks will be the iframe source of the App.

Regards,
Sachin