Answered
Hi,
I've just read the article about Dynamics Stamp Secret but i can't still do what i want.
Basically i would like to add via javascript a stamp on a document and then change some properties on it.
Here is what i do :
var annot = this.addAnnot({ page: 0, type: "Stamp", name: "vole", rect: [400, 400, 550, 500], AP: "NotApproved" });
then on a button :
var a = this.getAnnot(0, "vole"); a.opacity=50;
The problem is that i would like to do this with a custom stamp i've created and i can't find a way to get the name of the custom stamp ! so i cannot apply the "AP" when i create it ...
I'm trying to get the custom stamp name using event.source.stampName but an error happens when i run this line code :
event.value = event.source.stampName; console.println("Stamp Name: " + event.source.stampName);
I'm pretty new to pdf and even with the document downloade on Dynamics Stamp Secret tutorial i can't get any name from my custom stamp....
If anyone can help ...
Regards
But there is another way to get the stamp name. The name of stamp is also part of the template name, so you can get it from the "Page Templates" dialog. And it is also part of the language independant name of the menu item that activates the stamp tool. To get the menus read this article:
http://www.acrobatusers.com/tutorials/2008/06/executing_menu_items_from_javascript
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script