在PDF文件中使用JavaScript代码的文档 [英] Documentation for using JavaScript code inside a PDF file

查看:388
本文介绍了在PDF文件中使用JavaScript代码的文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PDF中运行JavaScript代码时,在哪里可以找到文档?

我从未在PDF文档中添加JavaScript操作.但是,我已经使用JavaScript完成了很多Web开发.对于那些对PDF文档中的JavaScript有任何熟悉的人,我有几个问题.

NitroPDF和Adobe Acrobat绝对支持PDF文件中的JavaScript. 是否存在关于各种对象的标准,以及通过JavaScript处理PDF文件的功能?到目前为止,我发现的所有内容都来自Adobe.似乎其他任何地方都可以参考Adobe的文档.是否有标准?或者Adobe只是事实"标准?

所有PDF查看器都支持JavaScript操作吗?

我可以在Adobe文档中找到关于在JavaScript文档中使用JavaScript的最佳文档- Adob​​e :: Acrobat JavaScript脚本编写指南.

NitroPDF具有此链接- NitroPDF :: PDF文件中的JavaScript ,但是它基本上只是说它支持Adobe的功能.

我还从Scribus中找到了此链接- Scribus ::如何使用JavaScript增强PDF表单,但这仅包括一些小的代码片段.没有什么超级有用的.

Adob​​e提供了有关如何使用其IDE为JavaScript设置断点等的文档.是否可以使用另一个IDE在PDF文件中运行JavaScript并具有断点等?找到像 Firebug 一样酷的东西.

注意:

请不要回答如何处理Web浏览器中加载的PDF.问题是关于从PDF文档中运行JavaScript.我正在尝试通过执行PDF文档中的JavaScript来探索各种可能性.具体来说,我可以使用 quickpdflibrary 中的函数向现有文档添加JavaScript功能. /p>

另一个有用的链接是使用Acrobat JavaScript开发.显然,PDF中的JavaScript代码通常被称为AcroJS或Acrobat JavaScript.

解决方案

可能您正在寻找 Acrobat开发人员中心包含指向不同版本文档的链接. JavaScript参考的当前版本也可以从Acrobat DC SDK获得.

Where can I find documentation on running JavaScript code inside a PDF?

I've never added a JavaScript action inside a PDF document. However, I've done quite a bit of web development using JavaScript. I have a few questions to whoever has any familiarity with JavaScript inside a PDF document.

NitroPDF and Adobe Acrobat definitely support JavaScript in PDF files. Is there a standard on various objects that exist and functions to manipulate a PDF file via JavaScript? Everything I've found so far has been from Adobe. Anywhere else seems to reference Adobe's documentation. Is there a standard out there, or is Adobe just the "de Facto" standard?

Also, Do all PDF viewers support JavaScript actions?

The best documentation on using JavaScript inside a PDF document that I could find was from Adobe - Adobe :: Acrobat JavaScript Scripting Guide.

NitroPDF has this link - NitroPDF :: JavaScript in PDF Files, but it basically just says it supports what Adobe has.

I also found this link from Scribus - Scribus :: How to enhance your PDF forms with JavaScript, but this only includes a few small snippets of code. Nothing super useful.

Adobe has documentation on how you can set breakpoints, etc... for JavaScript using their IDE. Is it possible to run JavaScript in a PDF file using another IDE and have breakpoints, etc...? It would be awesome to find something as cool as Firebug.

Note:

Please do not answer how to manipulate a PDF that is loaded in a web browser. The question is about running JavaScript from within a PDF document. I'm trying to explore the possibilities available via executing JavaScript in the PDF document. Specifically I may use functions from quickpdflibrary to add JavaScript functionality to existing documents.

Another useful link is Developing with Acrobat JavaScript. Apparently JavaScript code in PDFs is frequently called AcroJS or Acrobat JavaScript.

解决方案

Probably you are looking for JavaScript™ for Acrobat® API Reference.

This reference should be the most complete. But, as @Orbling said, not all PDF viewers might support all of the API.

EDIT:

It turns out there are newer versions of the reference in Acrobat SDK (thanks to @jss).

Acrobat Developer Center contains links to different versions of documentation. Current version of JavaScript reference from Acrobat DC SDK is available there too.

这篇关于在PDF文件中使用JavaScript代码的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆