简体   繁体   English

iframe:删除内部(灰色)边框

[英]iframe: removing internal (grey) border

I want to embed a pdf-document on my website, but cannot manage to display the document in the iframe without an overwhelmingly useless gray border. 我想在自己的网站上嵌入pdf文档,但是如果没有明显的无用灰色边框,就无法在iframe中显示该文档。

Now I see that this gray border is not always displayed when embedding a pdf-document, but in my example as you can see in the picture, there is a large border withing the iframe, next to the pdf-page I actually would like to display. 现在,我发现在嵌入pdf文档时并不总是显示此灰色边框,但是在我的示例中(如您在图片中所见),iframe旁边有一个大边框,我实际上想要在pdf页面旁边显示。

See here what I am talking about: 看到这里我在说什么:

I am using a simple iframe-tag within a div-tag. 我在div标签中使用了一个简单的iframe标签。

Does anybody know if it is possible to remove the grey border ("Border in iframe") or how I can deal with this problem? 有谁知道是否可以删除灰色边框(“ iframe中的边框”),或者我该如何解决这个问题?

The border you see is when the page is not matching the aspect-ratio of the view-port of the Acrobat plugin. 您看到的边框是页面与Acrobat插件的视口的纵横比不匹配时。

You need to make sure the iFrame and the plugin and the document inside it are all the same width and that the user has not set the page to be shown in some other way such as full height (set in Acrobat Reader preferences) 您需要确保iFrame及其插件和其中的文档宽度相同,并且用户未将页面设置为以其他方式显示,例如全高(在Acrobat Reader首选项中设置)

For now try adding this to the PDF url: 现在,请尝试将其添加到PDF网址:

#view=Fit&toolbar=0&statusbar=0&messages=0&navpanes=0&scrollbar=0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM