JavaScript or C++

New Here ,
May 27, 2019

Copy link to clipboard

Copied

Hello Forum,

I was assigned a task, and although I can think of other ways to do this, it is the preference of my employer.  Basically, I need to write code that will add a menu option for printing.  The user will tab to the menu, select "Print Signature" and the code will save the document as a jpg and then save the jpg as a pdf.  This is to make the signature more natural looking.

The question I have is this:  Can JavaScript code be made persistent?  That is to say, when my employer opens the document, will the menu item be there every time, or will he have to reinstall the JavaScript every time?  Is JavaScript something that IT will have to deploy, or can my employer click a button and add the menu item?

Also, can this task be accomplished with JavaScript, or will I have to cozy up to some C++ tutorials?

Thanks in advance.  I am excited to learn more about Adobe.

Best,

Justin Lawrence

TOPICS
Acrobat SDK and JavaScript, Macintosh, Windows

Views

109

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
May 27, 2019

Copy link to clipboard

Copied

It can be done using JS, and it can be "persistent" in the sense that it will always appear as a menu item in Acrobat if you create and install it correctly. However, this is a bad idea. "Re-frying" a PDF file like that gets rid of a lot of beneficial information, not to mention causes the file to be un-searchable (unless you run Text Recognition on it after re-creating it, which you can't do with JavaScript), and degrade the file's quality significantly (as you're moving from a vector-based file to a bitmap image).

I really don't understand the reasoning behind wanting to do it this way. How would it make any signature look more "natural"? Also, what kind of signature are we talking about here? If it's a Digital Signature then it's even more of a bad idea, as it will also invalidate it entirely.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
May 27, 2019

Copy link to clipboard

Copied

Hello Justin,

    The best method for the type of script you've described is an Acrobat Automation Script. You can find out more about writing Acrobat Automation scripts here:

Automating Acrobat can save you loads of time.

However, you mentioned that this was about a signature image. I have an inexpensive tool for creating high quality signature images. An Acrobat Signature stamp specifically. Contact me at support@windjack.com if you are interested.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more