<object> tag with pdf doesn't work in firefox and is messed up in IE

后端 未结 6 540
别那么骄傲
别那么骄傲 2021-01-04 09:26

I have object tag that look like this :

\" id=\"embedde
6条回答
  •  独厮守ぢ
    2021-01-04 09:33

    I wonder that this works in any browser!

    c:url is part of the JSP Standard Tag Library (JSTL). And to use JSTL core tags you should include in the JSP page at least:

    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    

    Next thing is that the PDF format is also no HTML (format)!
    The handling of PDF files depends heavily on the users system settings and configuration.

    Any browser would need an (integrated) plugin to display PDF files! See e.g. this question here at SO: Embed Pdf in html5

    As you can see therefore normally an embed element is used with a type attribute of type="application/pdf".

    But this is also far from ideal and won't work in every browser!

    What are my options here?

    As written in the accepted answer of the above linked question, you should "convert the PDF to HTML5 and embed the HTML5 version."

提交回复
热议问题