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

Select a Stamp with JavaScript

Community Expert ,
Feb 14, 2020 Feb 14, 2020

Copy link to clipboard

Copied

Hi

 

I want to create an add-on button tool, when the user clicks it displays a popup menu (popUpMenuEx), and this menu list some custom stamps, allowing the user to choose one.

 

I don't want to place the stamp on the page, I want the user to have the selected stamp on the cursor, so he just have to clic where he wants to place the stamp.

 

I know how to create a button and a popup, but I don't know how to select a stamp with JavaScript and I cannot find usefull information.

Is it possible?

 

Thank you.

TOPICS
Acrobat SDK and JavaScript

Views

658

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

correct answers 1 Correct answer

Community Expert , Feb 17, 2020 Feb 17, 2020

OK, thank you guys.

But I talk too much, I told my client, who did not know, that the Stamps palette is directly accessible in the commenting tools. So he no longer needs a script.

🙂

Votes

Translate

Translate
Community Expert ,
Feb 14, 2020 Feb 14, 2020

Copy link to clipboard

Copied

No. Why not use the built-in Stamp tool, instead? What you can do with a script is apply a specific stamp to a certain position on the page, though, and then the user can move it around, but you can't "pre-select" it and attach it to the mouse cursor.

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 ,
Feb 15, 2020 Feb 15, 2020

Copy link to clipboard

Copied

It's for a team of Acrobat Reader users. Acrobat Reader don't allow to customize the toolbar icons, so they need a quick access to some stamps.

 

Otherwise, is it possible to use JavaScript to quickly show the Stamp palette?

I cannot find any information about this.

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 ,
Feb 15, 2020 Feb 15, 2020

Copy link to clipboard

Copied

No, not possible.

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 ,
Feb 15, 2020 Feb 15, 2020

Copy link to clipboard

Copied

You can force the stamp toolset to appear. You just need the right menu name:

https://www.pdfscripting.com/members/Complete-List-of-Acrobat-Menu-itemsL-Hidden-Visible-and-Popup.c...

 

 

 

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
Community Expert ,
Feb 16, 2020 Feb 16, 2020

Copy link to clipboard

Copied

There's no menu item for the stamp tool. There is a quick tool item name called "Stamp", but that doesn't work.

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 ,
Feb 15, 2020 Feb 15, 2020

Copy link to clipboard

Copied

Creating such a tool for Reader is possible. 

And you already have the scripts for doing it

https://www.pdfscripting.com/members/Using_the_Mouse_to_Automate_Stamps.cfm?sd=53

 

I'm not sure if it is covered in the article, but I create the stamp as soon as the user selects the button/menu item, give it 50% opacity, and use a time to move it with the mouse. 

 

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
Community Expert ,
Feb 17, 2020 Feb 17, 2020

Copy link to clipboard

Copied

OK, thank you guys.

But I talk too much, I told my client, who did not know, that the Stamps palette is directly accessible in the commenting tools. So he no longer needs a script.

🙂

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 ,
Feb 17, 2020 Feb 17, 2020

Copy link to clipboard

Copied

LATEST

Ha ha, The simple obvious solutions are always the best 😉

 

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