Skip to main content
laurentp23906834
Participant
Aug 13, 2020 12:57 PM UTC
Answered

Placing stamps with JavaScript

Hi again,

In JavaScript I want to select a stamp and add it to the PDF (works fine so far):

 

this.addAnnot({
    type: "Stamp",
    page: 0,
    rect: [36, 72, 288, 144],
    AP:   "#DApproved"
});

 

The stamp is now placed to the exact position and size defined in the code.

Now I want to allow the user to place the stamp where ever he wants. (like when you select a stamp from the stamp toolbar)

How should I proceede?

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Aug 14, 2020 8:15 AM UTC

A) Yes, using the code you already have.

B, C) No.

3 replies

try67
Community Expert
Community Expert
Aug 13, 2020 1:22 PM UTC

That's not possible with a script. They can move the stamp after it is added, though.

Translate
laurentp23906834
Participant
Aug 14, 2020 6:11 AM UTC

okay - back to the original problem:

I try to create a tool that contains all the actions we need in our company.

A) Is there a way to add a button to the tool to apply a specific stamp?

B) Or to add the Stamp drop down ...

C) or the Stamps Palette button to the tool?

Translate
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Aug 14, 2020 8:15 AM UTC

A) Yes, using the code you already have.

B, C) No.

Translate