Hello
Is is possible with Preflight/Action lists to adjust the Trim box of a PDF
I'm receiving PDFs with trim Boxes like 314.33 x 190.5 and I wish to Round Up/Down the trim box size to a full number 314 x 191
Not all files are this size, most are different so the actual size is not important its just how can I RoundUp/Down the dimensions in a Action List
Any help would be appreciated
Adjust Trim Box
-
- Newbie
- Posts: 11
- Joined: Thu Sep 26, 2019 1:47 pm
- Location: Leeds, UK
Re: Adjust Trim Box
Create two variables with the desired values and use them in an Action List. There is a Calculator app in the Enfocus Appstore that can do the rounding part (if you have the Scripting Module you can also do this with a script expression).
A few more words about the approach in the Action List. The "Change trim box" allows you to set a new size for the trim box, but it will align on the 0,0 point, unless you use 4 values where you compensate half of the difference between the current size ([Stats.TrimBoxWidth], etc.) and the desired size.
With just the 2 correct size values you can do this:
Add object - Rectangle with a variable width and height and the center relative to the center of the trim box
Select last added objects
Change trim box - Resize page box to fit the selection
Remove selection (to remove the rectangle that was added to get the position right)
A few more words about the approach in the Action List. The "Change trim box" allows you to set a new size for the trim box, but it will align on the 0,0 point, unless you use 4 values where you compensate half of the difference between the current size ([Stats.TrimBoxWidth], etc.) and the desired size.
With just the 2 correct size values you can do this:
Add object - Rectangle with a variable width and height and the center relative to the center of the trim box
Select last added objects
Change trim box - Resize page box to fit the selection
Remove selection (to remove the rectangle that was added to get the position right)