我一直在尝试不同的显示 PDF 的方法,目的是找到一种方法将灰色背景更改为白色。
这是一个使用对象标签的简单示例(我使用嵌入和 iframe 标签得到相同的结果):
http://jsfiddle.net/5CALy/7/ http://jsfiddle.net/5CALy/7/
HTML
<object data='https://dl.dropboxusercontent.com/u/58922976/test.pdf#view=FitH&scrollbar=0&toolbar=0&statusbar=0&messages=0&navpanes=0'
type='application/pdf'
width='84%'
height='110px'>
<p>It appears your Web browser is not configured to display PDF files.
No worries, just <a href='https://dl.dropboxusercontent.com/u/58922976/test.pdf'>click here to download the PDF file.</a></p>
</object>
Thanks!!
The OP Link actually now succeeds by default, here is the view of requesting no pdf where response is with image on white background
https://dl.dropboxusercontent.com/u/58922976/test.pdf https://dl.dropboxusercontent.com/u/58922976/test.pdf
![enter image description here](https://i.stack.imgur.com/6nszM.png)
但是,通常使用深色或浅色演示文稿背景来显示图像、PowerPoint、pdf、其他视图
这完全取决于观众
This browser only opens files in external mode
![enter image description here](https://i.stack.imgur.com/8CdYd.png)
Or why not rainbow friendly?
![enter image description here](https://i.stack.imgur.com/5qw9n.png)
But for the answer, ask users to do it themselves
![enter image description here](https://i.stack.imgur.com/lcxN0.png)
对于 Firefox 用户,有一个 hack see如何在 Firefox 中查看 pdf 文件时启用深色模式 https://stackoverflow.com/questions/61814564/how-can-i-enable-dark-mode-when-viewing-a-pdf-file-in-firefox#61814602 https://stackoverflow.com/a/74564207/10802527 https://stackoverflow.com/a/74564207/10802527
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)