开发者

Javascript in a PDF?

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开发者_StackOverflow'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.

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)?

Anyone have suggestions for tutorials in Javascript specifically for PDF?


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

Here's some reference material:

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

and some tutorials:

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

http://www.pdfscripting.com/

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜