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: 17892
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: 1039
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: 17892
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: 17892
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
MedBooster
User
Posts: 1039
Joined: Mon Nov 15, 2021 8:38 pm

Re: Dynamic Stamp - Auto Resizing via javascript

Post by MedBooster »

Has this changed? Did you find any solution?
As of now there seems to not be any fixed size to stamps anymore, it rather depends on your last chosen size. I think.... are you still able to set default/fixed sizes of stamps?
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
TrackerSupp-Daniel
Site Admin
Posts: 8544
Joined: Wed Jan 03, 2018 6:52 pm

Re: Dynamic Stamp - Auto Resizing via javascript

Post by TrackerSupp-Daniel »

Hello, MedBooster

If you open the Stamps palette, and click "options" we have since added an option to place stamps with the "last used" size.
image.png
By default this is enabled, and allows you to take any stamp, press and drag to resize during placement, and then all future "click" placement will use that size until the next time you perform a drag placement.
If you disable this option, then the editor will stop recording new placement sizes, and will continue to use the current one until you re-enable this option. If you also click the "clear remembered sizes" option, you can then have all stamps revert to their original size at creation.

While you will still need to create multiple copies of each stamp, this should at least allow you to permanently "set" the size of each stamp "instance", for future use.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
MedBooster
User
Posts: 1039
Joined: Mon Nov 15, 2021 8:38 pm

Re: Dynamic Stamp - Auto Resizing via javascript

Post by MedBooster »

TrackerSupp-Daniel wrote: Mon Apr 08, 2024 3:51 pm Hello, MedBooster

If you open the Stamps palette, and click "options" we have since added an option to place stamps with the "last used" size.
image.png
By default this is enabled, and allows you to take any stamp, press and drag to resize during placement, and then all future "click" placement will use that size until the next time you perform a drag placement.
If you disable this option, then the editor will stop recording new placement sizes, and will continue to use the current one until you re-enable this option. If you also click the "clear remembered sizes" option, you can then have all stamps revert to their original size at creation.

While you will still need to create multiple copies of each stamp, this should at least allow you to permanently "set" the size of each stamp "instance", for future use.

Kind regards,

I see. If you toggle this off then? Can you set a specific pixel/cm width, or does it only use the original size of the stamp you saved?

Thank you
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
TrackerSupp-Daniel
Site Admin
Posts: 8544
Joined: Wed Jan 03, 2018 6:52 pm

Re: Dynamic Stamp - Auto Resizing via javascript

Post by TrackerSupp-Daniel »

Hello, MedBooster

While it is enabled, we will record the last used size, so you can enable this option, place your stamps at the desired size, and then disable it to continue using those sizes, without ever overwriting them.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply