Copy link to clipboard
is there any way to lock the stamp by default when it is placed using java script or any other mechanism . Now what we are trying to achieve is that need to lock the stamp.
Copy link to clipboard
Yes, there are a couple of ways to do this. Which one you use depends on what you are trying to achieve.
1) annotations have a "lock" property that when true keeps the user from being able to move the annotation. But otherwise the annotation keeps all of it's properties and the lock can be removed.
2) Annotations can be flattened, which makes the graphic on the annotation part of the page content, and all of the annotation features and properties are completely removed. All you get is the image on the annotation. And the original annot cannot be recovered.
Neither of these operations can be part of the stamp script. The script that either locks or flattens the annotation must be run from a different context.
You can actually set the lock property to true if you put the code to do so in app.setTimeOut withing the stamp code. You just can't reference the stamp or it's "source". You need to get a handle to the stamp independent of any code that runs when the stamp runs. Generally, I just get the last stamp created and use a 250-millisecond timeout.
Good one. So probably the the AP and current page number is good enough for identifying the last stamp applied. Tricky though.
... and a date sort. It's not foolproof but it works in common use cases.
Hi. I'm newbie scripting. Could you please make a example?
And, You mean that the blocked property is established in the stamp, in the moment you apply? or is permanent, which means any second user can´t delete never?
All annotations have a "lock" property. When set the annotation cannot be moved or resized. However, it is possible for a user to remove this property with a script from the console window.
I mean to lock the stamp, not about the annotations. I would like to lock the stamp via scripting.
@Joel_geraci1 suggest using app.setTimeOut, but I'm newbie scrpting and I don't know how...
The stamp is a type of annotation.
Are you sure this is a good idea? What if you want to move, resize or delete the stamp after applying it? Locking it will make it impossible to the regular user.
When I've set up the auto-lock for my customers, I also supply a menu item that can "unlock all annotations". In the use cases I've developed this for, that was acceptable.