<embed> tag to display PDF not working

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

<embed> tag to display PDF not working

Postby betonetotbo » Mon Apr 20, 2020 3:11 pm

I was using a old version of CEF 76.1.11+gdc028ce+chromium-76.0.3809.132 and it was displaying the PDF correctly.

After I update to CEF 79.1.38+gecefb59+chromium-79.0.3945.130 the embed tag stops displaying the PDF, and a console warning message was printing (DEVTOOLS) :

Resource interpreted as Document but transferred with MIME type application/pdf: "https://pdfobject.com/pdf/sample-3pp.pdf".

The site I'm testing is https://pdfobject.com/, it is a project containing a JS library to display PDFs in HTML. I'm using it with my AngularJS application.

This is my HTML resultant :

Code: Select all
<embed class="pdfobject" src="https://pdfobject.com/pdf/sample-3pp.pdf" type="application/pdf" style="overflow: auto; width: 100%; height: 100%;">
</embed>


Any ideia what can be this?
betonetotbo
Newbie
 
Posts: 6
Joined: Thu Mar 09, 2017 7:57 am

Re: <embed> tag to display PDF not working

Postby HarmlessDave » Mon Apr 20, 2020 3:39 pm

pdfobject.com works for me in 78.3.1+g8819d2e+chromium-78.0.3904.87 Windows 32-bit. I haven't tried 79+

What OS / bit version did you use, and is it a "stock" CEFClient sample or modified?
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: <embed> tag to display PDF not working

Postby betonetotbo » Mon Apr 20, 2020 3:45 pm

Solved.

I have updated to 80.1.15+g7b802c9+chromium-80.0.3987.163, this version solved my issue.
betonetotbo
Newbie
 
Posts: 6
Joined: Thu Mar 09, 2017 7:57 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 97 guests