在浏览器中自定义 PDF 视图
我已经解决了一个要求,允许我通过执行 Response.ContentType = "application/pdf" 在浏览器中显示 PDF 文件。
问题是 PDF 的默认视图始终在左侧显示书签菜单,有没有办法通过使用 HTTP 标头或其他方式告诉 PDF 查看器不要显示书签部分?
提前致谢。
I've worked on a requirement that allows me to show a PDF file inside a browser by doingo a Response.ContentType = "application/pdf".
The problem is that the default view of the PDF is always showing the bookmarks menu at the left, is there a way by using HTTP headers or something to tell the PDF viewer not to show the bookmarks section?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有两种方法可以做到这一点。我推荐的方法是在 Adobe Acrobat 中实际打开 PDF,然后转到“文件”、“属性”。在“初始视图”选项卡上,您将看到许多有关如何显示 PDF 的选项。第二种方式我还没有测试过,但 Adobe 说你可以传递各种 querystring 选项。您可能想要的是
http://example.org/doc.pdf#pagemode=none
There's two ways that you can do it. The way that I would recommend is to actually open the PDF in Adobe Acrobat and go to File, Properties. On the Initial View tab you'll see a lot of options for how to display the PDF. The second way I haven't tested but Adobe says you can pass various querystring options to the PDF. The one you'd probably want is
http://example.org/doc.pdf#pagemode=none
PDF文档的显示方式可以在PDF文档内部配置。
有很多 PDF 编辑器可以修改“查看器首选项”,因为它通常被称为“查看器首选项”。一个免费示例是 BeCyPDFMetaEdit。
The way how a PDF document is displayed can be configured inside the PDF document.
There are a lot of PDF editors that can modify the "viewer preferences" as it is mostly called. One free example is BeCyPDFMetaEdit.