Zoom and other parameters on embedded PDF object not working

走远了吗. 提交于 2019-12-07 17:42:29

问题


I am embedding a PDF using <object> into a page. I want the PDF to display as only a portion of the page, and I would like for the whole first page to show in the visible area (similar to an image snapshot of the first page). I am working with the PDF open parameters and I see various examples for adjusting zoom and view, for example:

  • http://example.org/doc.pdf#page=3&zoom=200,250,100
  • http://example.org/doc.pdf#page=72&view=fitH,100

I can't get these to work. When I change the page parameter, the page displayed changes, but I cannot figure out how to adjust the view.

JS Fiddle demo showing the issue. And an example of the embed code:

<object width="300" height="375" type="application/pdf" data="file.pdf?#page=2&zoom=100">
    <p>Message for non-compatible browsers</p>
</object>

I saw this question: Initial Zoom Parameter for PDF Object in HTML5, but the answers did not help me.

来源:https://stackoverflow.com/questions/25917007/zoom-and-other-parameters-on-embedded-pdf-object-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!