RubyPDF Blog Adobe Acrobat,Adobe LiveCycle,PDF,PDF Form How to create a unique ID in a PDF using JavaScript

How to create a unique ID in a PDF using JavaScript

On RAC, I noticed a bid named “Create a small Interactive & Dynamic PDF Order Form in Adobe Designer”, said

I need a PDF ‘Order Form’ to be sent by email when completed. This form will auto generate a unique serial number, consist of radio buttons, check boxes, javascript validations(scripts), text fields, number fields, etc.
The order form will be used by customners to order personalised products (to have their name on it), the form will have a section for user to enter personalised text, change font, text size, etc.
After filling up the form, the form will have a submit by email button and print button. Submit by email means the form should attach itself in a new email message as PDF and send it to a pre-programmed email address.
The form will be interactive and dynamic which means for e.g. upon clicking a radio button, a section or controls are visible or turned active/inactive – more or less like a software application form!
More details will be given later during bidding.
This interactive and dynamic form will be designed in Adobe Designer however you are free to suggest and (if approved) use any other software to create such a PDF form.

After reviewed the requirement, I think the difficult point is “This form will auto generate a unique serial number”, so I think it would be better if exists a javascript class/function can be used in PDF to create a UUID/GUID, after searching and testing, I found JavaScript UUID Class is what I want.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.