Dynamic Stamp - Auto Resizing via javascript

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

Post Reply
chetanmore777
User
Posts: 1
Joined: Fri Jun 02, 2023 5:48 pm

Dynamic Stamp - Auto Resizing via javascript

Post by chetanmore777 »

Hello There,

We are creating a dynamic stamp to make stamping easier for our internal users. We are using pdf xchange editor plus licensed software.
However, we are not able to find any accessible dynamic stamping properties that can help us to resize the stamp automatically using JavaScript.

Can someone please help us identify those properties of the dynamic stamps?

I really appreciate any help you can provide.

Thanks,
Chetan More
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Dynamic Stamp - Auto Resizing via javascript

Post by Tracker Supp-Stefan »

Hello chetanmore777,

The stamps would normally be placed at 100% scaling relative to their size in the Stamp Collection document. So if you need different sizes - you will need to e.g. make a few templates, or tell your users that they can click and drag to resize. I do not think there is any JS that can control the size of the placed stamp on the page.

Kind regards,
Stefan
MedBooster
User
Posts: 1011
Joined: Mon Nov 15, 2021 8:38 pm

Re: Dynamic Stamp - Auto Resizing via javascript

Post by MedBooster »

Dynamic stamps are great, but to change the size or move the folder they are in.... it is easier to just create a new stamp... It doesn't seem like you can edit them and change sizes easily...

I support the sentiment
Wishlist
Bookmarks with page numbers
Optional fixed small icon size in the toolbar
Shift to UNLOCK aspect ratio/i]
Allow more "toolbars" to the title bar
AltGr issues with character input and keyboard shortcuts
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Dynamic Stamp - Auto Resizing via javascript

Post by Tracker Supp-Stefan »

Hello MedBooster,

You can technically edit the stamp collection they are in - and if you resize the visual part - that will have effect on how the stamp behaves when you use it later - but yes - creating several copies with the desired different sizes is likely the easiest solution!

Kind regards,
Stefan
benep
User
Posts: 12
Joined: Thu Dec 08, 2022 7:14 am

Re: Dynamic Stamp - Auto Resizing via javascript

Post by benep »

Hello,

currently it is possible to make a call to app.setTimeout in the stamp script and change the annotation/ the stamp after it has been placed. For the size you can moddify the rect property of the annotation.

Kind regards
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Dynamic Stamp - Auto Resizing via javascript

Post by Tracker Supp-Stefan »

Hello benep,

Yes - it might be possible via code - however it would be better done in a pop-up dialogue.
However - it will likely still be better if the desired different sizes are specified as separate stamps - as it will be the quickest way to select and use the correct size. Or you can always just drag with the mouse while placing the stamp to get it to the desired size without having to worry with versions or code to handle this!

Kind regards,
Stefan
Post Reply