从网页链接到PDF文档中的特定部分(锚点) [英] Linking from a web page to a specific section (anchor) in PDF document
问题描述
在理论上有一个 Adobe标准指定打开浏览器中点击的链接打开PDF文档,打开PDF文档的特定部分(AKA锚点,命名参考)。如果想引用大型PDF的特定部分(例如某些标准或规范),此功能应该很有帮助。
然而,从我看到的例如,这些链接应该在第3.2.6节注释类型中打开Scala参考PDF: / p>- http://www.scala-lang.org/docu/files/ScalaReference.pdf#subsection.3.2.6
- http://www.scala-lang.org/docu/files/ScalaReference.pdf#nameddest=subsection .3.2.6
- http ://www.scala-lang.org/docu/files/ScalaReference.pdf#page=23
(技术上,变体#3应该打开第23页,这本质上是相同的目的地)
是否有一种工作方式(可能与几个垫片,私有包装或其他任何东西)在大多数系统上工作?什么是Adobe Reader插件的使用份额,我应该关心其他系统吗?
如果这是不可能的,至少我希望找到一个适合每个人的工作解决方案我可以推荐给我的网站用户的平台(如Windows,Linux,Mac),如果他们希望能够使用指定的目的地链接。
从我测试过的:
- Windows,MSIE / Firefox / Chrome,Adobe Acrobat Reader插件 - 所有版本都支持版本9+,但是:
- MSIE有一个奇怪的缓存问题(即在文档被缓存之前锚不起作用)
- 旧版本无法使用
- 它的链接格式问题:通常,它应该是正常的绝对链接到一个真正的Web服务器,从http://开始。相对链接,samba风格的链接(
\\HOST\dir\file.pdf#something
),除了http(或者可能是https )方案无效
Linux / Konqueror / Okular - 只有变种#1有效
如果您尝试测试它,我将不胜感激以各种不同的组合。
似乎一般工作的变体是#4但使用页面的数量,如PDF文档中的实际分页,在这种情况下
http://www.scala-lang.org/docu/files/ScalaReference.pdf#page=31 p>
PDF文档具有从内容本身开始的内容的页码,但是该编号不同于在#page = ...中使用的编号
There is a standard from Adobe that in theory specifies opening PDF documents from a link clicked in a browser in a way to open specific sections (AKA "anchor", "named reference") of PDF document. This functionality should be of great help if one would like to refer to a specific portion of large PDF (such as some standard or specification).
However, from what I see now, support for this standard is close to non-existent.
For example, these links should open Scala Reference PDF at section 3.2.6, "Annotated Types":
- http://www.scala-lang.org/docu/files/ScalaReference.pdf#subsection.3.2.6
- http://www.scala-lang.org/docu/files/ScalaReference.pdf#nameddest=subsection.3.2.6
- http://www.scala-lang.org/docu/files/ScalaReference.pdf#page=23
(Techincally, variant #3 should open page #23, which is essentially the same destination)
Is there a working way (may be with a couple of shims, proprietary wrappers or whatever else) to make this work on majority of systems? What is the usage share of Adobe Reader plugin, should I care about other systems?
If it's not possible, at least I'd like to find a working solution for every platform (i.e. Windows, Linux, Mac) that I could recommend to my site's users if they want to be able to use named destination links.
From what I've tested:
- Windows, MSIE/Firefox/Chrome, Adobe Acrobat Reader plugin - all variants work with version 9+, but:
- MSIE has a weird caching issue (i.e. anchor does not work until document was cached)
- Older versions do not work
- It has issues with link format: generally, it should be regular absolute link to a real web server, starting with "http://". Relative links, samba-style links (
\\HOST\dir\file.pdf#something
), anything else besides "http" (or probably, "https") scheme won't work
- Windows, any browsers set up to run Adobe Acrobat Reader as a separate process - does not work
- Windows, any browsers, FoxIt Reader - does not work
- Windows, any browsers, CutePDF - does not work
- Linux/Konqueror/Okular - only variant #1 works
- Linux, any other browsers set up to run Okular or any other PDF viewer as external process - does not work (as browser does not pass any "#arguments" in a command line)
- Any OS, Firefox 15+ PDF.js internal PDF viewer - does not work
I'd appreciate if you'd try it to test in various different combinations.
What seems to work in general is variant #4 but using the number of the page as in actual division into pages in the PDF document, in this case
http://www.scala-lang.org/docu/files/ScalaReference.pdf#page=31
The PDF document has page numbers that start from the content proper, after the table of content, but that numbering differs from the one to be used in #page=...
这篇关于从网页链接到PDF文档中的特定部分(锚点)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!