Hello,
Is there any way to programmatically adjust the size of stamps to a percentage (say 80%) of their size when placed. The reason we are asking is that a customer has created custom stamps which are only 14x14 pixels but they are still appearing too large for them to place them in in the boxes on their forms. They cannot make them any smaller by reducing pixel count, is there any other way for them to make them smaller.
Programmatically adjust size of stamps SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2352
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Programmatically adjust size of stamps
Its possible by javascript:
HTH
Code: Select all
var pn = this.numPages;
for (i = 0; i < pn; i++)
{
var aa = this.getAnnots(i);
if (aa.length == 0)
continue;
for (j = 0; j < aa.length; j++)
{
var a = aa[j];
if (a.type != "Stamp")
continue;
var x = a.rect[0];
var y = a.rect[1];
var w = a.rect[2] - x;
var h = a.rect[3] - y;
a.rect = [x, y, x + w * 0.8, y + h * 0.8]
}
}
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact: