Skip to main content
Inspiring
May 13, 2024 1:02 PM UTC
Answered

Crop PDF to crop marks?

Is there a way to create an Action/Fixup that crops every page of a PDF in the following way: Everything inside the crop marks are kept, but the crop marks themselves plus everything outside is removed.

 

I found a javascript snippet years ago that achieved this as an Action iirc, but I don't have it anymore. Been searching and trying out different solutions but nothing seems to work.

Ruben SolérCorrect answer
Inspiring
Jan 22, 2025 12:05 PM UTC

I managed to find the snippet, which can be saved as an action:

 

/* Crop to Cropmarks */
for (var i=0; i<this.numPages; i++) {
var ar = this.getPageBox("Trim", i);
this.setPageBoxes("Crop", i, i, ar);
}

1 reply

Ruben SolérAuthorCorrect answer
Inspiring
Jan 22, 2025 12:05 PM UTC

I managed to find the snippet, which can be saved as an action:

 

/* Crop to Cropmarks */
for (var i=0; i<this.numPages; i++) {
var ar = this.getPageBox("Trim", i);
this.setPageBoxes("Crop", i, i, ar);
}

Translate