简体   繁体   English

Adobe Acrobat的JavaScript API - 如何使用JavaScript创建非PDF文档的相对链接?

[英]JavaScript API for Adobe Acrobat - how to create a relative link to a non-PDF document with JavaScript?

My company wants to set up some PDF documents to track projects. 我的公司想要设置一些PDF文档来跟踪项目。 We want to create links inside the PDF that, when clicked, open a given document (.doc, .xls etc) using a relative path. 我们想在PDF中创建链接,当单击时,使用相对路径打开给定文档(.doc,.xls等)。

There is the app.openDoc JavaScript method, however that only works for PDF files. 有app.openDoc JavaScript方法,但只适用于PDF文件。

There is the "Open a file" action, but that seems to work for only absolute paths. 有“打开文件”操作,但这似乎只适用于绝对路径。

I've looked into the API ( http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf ) to no avail ... does anyone know how to do this? 我查看了API( http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf )无济于事......有谁知道怎么做?

The doc object has no such method, but you can do the following: doc对象没有这样的方法,但您可以执行以下操作:

As an alternative, you can also use the util.readFileIntoStream method in a closed environment where you can install folder-level scripts on everyone's system. 作为替代方案,您还可以在封闭环境中使用util.readFileIntoStream方法,您可以在每个人的系统上安装文件夹级脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM