【发布时间】:2017-09-26 18:54:23
【问题描述】:
我正在使用 IDR 工具 (https://www.idrsolutions.com/online-pdf-to-html5-converter) 将 PDF 文件转换为 HTML5。它具有呈现 svg 文件的对象标签。正如SVG not showing in object tag after publishing to web 所提到的,我将“.svg”mime 类型添加到应用程序的web.config 文件或IIS 服务器中。仍然没有用。我尝试将object 标记替换为img 标记,并将数据属性替换为src 属性。然后它导致空的 UI 页面。我也尝试使用 iframe 标签,但它会导致 UI 失真。有没有其他方法可以解决这个问题?
代码行如下:
<div id="pg1" style="-webkit-user-select: none;"><object width="935" height="1210" data="1/1.svg" type="image/svg+xml" id="pdf1" style="width:935px; height:1210px; background-color:white; -moz-transform:scale(1); z-index: 0;"></object></div>
【问题讨论】:
标签: html pdf svg iframe mime-types