Have a template where I move a box around to hide som data in the original PDF document.
Template have been working for years now.
Now we updated a customer to new windows servers and the newest Designer version 2026.1.
Now the calculations does not work any more.
Same workflow, same datamapper, same template.
It is a simple script which calculates a position for the box, it gets a value in mm from the workflow/datamapper.
Now I have to add topoffset and leftoffset i to the script, to get the positions right. any hints on why ?
Script:
results.css(postion,absolute);
var topoffset = 25; // Placed when shifting to version 2026.1
var leftoffset = 15; // Placed when shifting to version 2026.1
var mypixels = record.fields.TAG_START_Position_Page1 / 100 * 3.779528 - topoffset; // Calculate from mm → pixel
Did you switch from Connect 2025.1 to Connect Chromium 2026.1? Switching from the Gecko based Connect to the Chromium based Designer will produce variation in the Template.
Your screenshots are cropped, but I think it’s safe to assume topoffset and leftoffset are equal to your section margins.
In 2025.1 statements like results.css("left", value1) and results.css("top", value2) were ignored for an anchored element. It did not matter what values you passed.
In 2026.1 these statements do work. You’re no longer forced to do results.attr("offset-x", value1 + "px") and results.attr("offset-y", value2 + "px"), which is non-standard.
This surfaced a problem in your script. You’re passing the same values to results.css("left", value) and results.attr("offset-x", value) (and similarly for “top” and “offset-y”) but that will not work properly if you have margins.
For results.attr("offset-x", value) the origin is the left edge of the page, but for results.css("left", value) the origin is the left section margin, so the values should be different if you want it to end up in the same spot.
There is no need to use results.css and results.attr at the same time though. I think the results.attr lines produce the desired result, so just remove the results.css lines.