使用相对地址在PDF文件中添加链接到PDF
我想在PDF中添加指向某些文本的链接,该链接将带来另一个位于同一文件夹中的PDF。我希望使用相对地址,以便PDF套件可运输到其他用户和计算机。我希望这能在Linux和Mac上使用。 尽管承诺,Libreoffice抽奖将链接地址作为一条完整的道路写出。因此,如果带有另一台用户的另一台计算机,链接将无法正常工作。 我尝试使用VI手动编辑PDF文件,并更改链接语法。
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[940.9 480.3 1200.7 507.9]/A<</Type/Action/S/URI/URI(Content/Information.pdf)>>
在目标文件中,“ Information.pdf”位于子目录“目录”中。
在Linux上使用文档查看器,它有效!在Apple上,预览(PDF查看器)解释了某些应用程序需要打开目标文件。 Adobe Reader也不喜欢此语法。我尝试将文件名加上关键字“ file:”前缀,哪个适用于完整路径,但不适合相对地址。 有人知道语法可能对我有用吗
I want to add a link to some text within a PDF that will bring up another PDF that is located in the same folder. I wish to use relative addressing so that the PDF suite is transportable to other users and computers. I wish this to work on Linux and Macs.
LibreOffice Draw, despite promises, writes out the link address as a full path. Thus if taken to another computer with another user the link fails to work.
I tried manually editing the PDF files using vi and altered the link syntax so;
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[940.9 480.3 1200.7 507.9]/A<</Type/Action/S/URI/URI(Content/Information.pdf)>>
where the target file, "Information.pdf" is in a subdirectory "Contents".
On Linux using Document Viewer, it works! On an Apple, Preview (a PDF viewer) interprets the target file needs to be opened by some application. Adobe Reader doesn't like this syntax either. I tried prefixing the filename with the keyword "file:" which works for a full path but not with relative addressing.
Does anyone know what syntax might work for me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑PDF您可以选择文本并使用Libreoffice绘制添加超链接。然后,可以使用文本编辑器(例如VI)编辑PDF文件。
通过链接搜索目标的文件名找到行。一个问题是Libreoffice坚持使用完全合格的域名来找到该文件,并且在移动文件后,这将无法使用,说到另一台计算机。未经编辑的线应该类似;
其中content/goody.pdf是与链接pdf相同目录中的链接目标。该行应更改为
Unix和MacOS上的此作品
Editing a PDF you can select text and add a hyperlink using LibreOffice Draw. It is then possible to edit the PDF file with a text editor such as vi.
To find the line with the link search for the filename of the target. One problem is that LibreOffice insists in using a fully qualified domain name to locate the file and this won't work after the file is moved, say to another computer. The unedited line should be similar to;
Where Content/Information.pdf is the link target in the same directory as the linking pdf. This line should be changed to
This works on Unix and MacOs