问题描述
我有一个像这样的嵌入标签:
I have an embed tag like this:
<embed src="../../Content/PDF/StockReport.pdf#zoom=50" width="100%" height="100%">
#zoom=50 是一个参数,告诉 pdf 阅读器缩放到 50%.这适用于所有浏览器,但 google chrome 除外,因为 chrome 具有内置的 pdf 查看器.
the #zoom=50 is a parameter that tells the pdf reader to zoom to 50%.This works in all browsers but google chrome because chrome has a built in pdf viewer.
如何将相同的参数传递给 google chrome 的 pdf 查看器?
How can I pass this same parameter to google chrome's pdf viewer ?
推荐答案
在检查了各种 chrome 错误报告后,我可以确认 Google Chrome 忽略了 Adobe PDF 查看器的默认功能.在此回答时,无法将参数(如缩放)传递给 Chrome PDF 查看器.
After checking various chrome bug reports, I can confirm that Google Chrome ignores the default functionality of Adobe PDF viewer. At the time of this answer there is no way to pass parameters (like zoom) to the Chrome PDF viewer.
编辑
Chromium 团队在这方面取得了进展.这项工作是在参考 Acrobat SDK 和 RFC 3778.截至 2017 年 12 月,Chromium 添加了对 view
、zoom
、page
、toolbar
和 nameddest的支持代码>,然后将其导入 Chrome.
Progress has been made on this by the Chromium team. The work was being done with reference to both the Acrobat SDK and RFC 3778. As of Dec 2017 Chromium added support for view
, zoom
, page
, toolbar
and nameddest
and later made it into Chrome.
这篇关于如何为 google chrome adobe pdf viewer 指定参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!