Forum for the PDF-XChange Editor - Free and Licensed Versions
Moderators:TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Not sure if this is possible
I want to provide the user with a stamp which asks them for an angle in degrees and rotates the stamp when they use it from the stamp pallet
here is the code I've got so far
Thanks for the post - Typically we don't write users code for them unless it's something really simple and working with dialogs via JS is not trivial. Is there something specific that we can guide you on?
Thanks,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
var annots = this.getAnnot(0, "h2yaK916D7gKH6wiDDHfe0");
annots.rotate=Consentdialog.degrees;
for the above running you need the correct pagenumber where the stamp is put on - at the moment the first page ("0") -
or you have the object already ...
regards,
"You cannot know the meaning of your life until you are connected to the power that created you.” Shri Mataji Nirmala Devi, founder of Sahaja Yoga
I believe the code you've given below would work from the console windows after the stamp has been placed
basically I'm trying to set the rotate as the stamp is being pulled from the stamp pallet.
really I'm asking if we can access properties such as rotate as we are stamping not after the stamp is there
you have to find out how to get the stamp object, as I have no idea about the events you
sucessfully implented - just realized that the pdf is the stamp.
The object maybe is given through the event.source.xxxx
if not hopefully the pagenumber, so you can use the code
if(event.source.forReal &&
((event.source.stampName == "h2yaK916D7gKH6wiDDHfe0")))
{
app.execDialog(Consentdialog)
if(Consentdialog.degrees !="")
{
// here you have to get the object, maybe already there
// or getting like this
var page=0; // first page in the doc
var annots = this.getAnnot(page, "h2yaK916D7gKH6wiDDHfe0");
annots.rotate=Consentdialog.degrees;
}
}
If the object is found it will work as you like....
I cannot test it, as I am limited to PDF-XChange without dynamic stamps,
regards,
"You cannot know the meaning of your life until you are connected to the power that created you.” Shri Mataji Nirmala Devi, founder of Sahaja Yoga