• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

JavaScript or C++

New Here ,
May 27, 2019 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 , Windows

Views

269

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 27, 2019 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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 27, 2019 May 27, 2019

Copy link to clipboard

Copied

LATEST

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.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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