PDF格式的Javascript? [英] Javascript in a PDF?

查看:74
本文介绍了PDF格式的Javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个可编辑的PDF格式,供学生索取成绩单。现在,我想限制输入。例如,我只想要他们的身份证号码,我只想在姓名字段中输入字母(没有特殊字符)等。此外,还有一个名为年度最后参加者的输入,他们进入上一学年的用户上过大学。如果输入的值在当前日期的5年内,则用户应该提醒他/她可以通过其他网站请求成绩单。

I made up an editable PDF for students to request transcripts. Now, I want to constrain the input. For example, I want only numbers for their ID number, and I want only letters (no special characters) in the name fields, etc. In addition, there's an input called "Year Last Attended" where they enter the last academic year the user attended the university. If the value entered is within 5 years of the current date, then the user should alerted that he/she can request a transcript through another website.

JS可以这样做吗?如果是这样,你会怎么做?我只需要上面列出的事情的例子,我可以从那里开始工作。如果没有,我将如何在PDF(Acrobat Pro)中执行此操作?

Can JS do this? If so, how would you do this? I just need examples for the things I've listed above, and I can work from there. If not, how would I do this in a PDF (Acrobat Pro)?

任何人都有专门针对PDF的Javascript教程的建议吗?

Anyone have suggestions for tutorials in Javascript specifically for PDF?

推荐答案

是的,Adobe Acrobat Reader支持托管JavaScript以用于字段验证等用途。

Yes, the Adobe Acrobat Reader supports hosting JavaScript for uses such as field validation.

这里有一些参考资料:

http: //www.adobe.com/devnet/acrobat/javascript.html

和一些教程:

http://www.evermap.com/javascript.asp

http://www.pdfscripting.com/

AFAIK,需要完整(Pro)版本的Acrobat来编写脚本。

AFAIK, you will need the full (Pro) version of Acrobat to write the scripts.

这篇关于PDF格式的Javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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