Skip to main content
Participant
December 4, 2019
Question

Trim pages per odd number page and even number page

  • December 4, 2019
  • 2 replies
  • 1246 views

hi, I'm using acrobat pro DC. 

I had a pdf file of about 100 pages, each page was center spread and there's spine in the middle.

I separted them by pdf print in poster printing then spine of the book is spritted into half and...

Now half of the spine appers in every pages,

Odd number pages have the half of the spine on the left.

Even number page have the other half of spine on the right.

How can I remove/cut (delete or trim off) the spine part of each page?

Now I have 200 pages, I can't trim every page one by one.

 

Thank you!

 

 

This topic has been closed for replies.

2 replies

Bernd Alheit
Community Expert
Community Expert
December 9, 2019

You can use the Crop Tool for this.

Thom Parker
Community Expert
Community Expert
December 4, 2019

This can be done with a script. It's actually not to difficult. If you know the exact amount of trim thats needed you can change the cropbox to clip the spine graphic. Does the actual size of the page matter? 

 

var nTrim = 72; // One inch
for(var i=0;i<this.numPages;i++)
{
    aBox = this.getPageBox("Crop",i);
    if(i&1)
        aBox[0] += nTrim;
    else
        aBox[2] -= nTrim;
    this.setPageBoxes("Crop",i,i,aBox);
}
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
TDNozwAuthor
Participant
December 4, 2019

Hi Thom, thank you very much for suggestion.

 

I am not familier with using script at all though, is that what to type in to JavaScript edditor?

 

To be more specific about page size, it's not a normal size, in"mm",

Current page size:

Width: 124.5mm, Height:170mm

Unwanted spine is in vertical on each page, 

Odd number page spine: 4.5mm from the left edge,

Even number page spine: 4.5mm from the right edge.

 

The file has pages from 1 to 200.

How can I use these parameters into the script?

 

Thank you!

 

 

 

Thom Parker
Community Expert
Community Expert
December 4, 2019

So this script is a one off that was designed to run in the Console Window. 

You'll find a tutorial here:

https://www.pdfscripting.com/public/Free_Videos.cfm#JSIntro

 

In PDF scripting all units of measurment are in points. There are 72 points/inch.

You'll need to figure out how many points you need to trim the edge 4.5 mm. That's the "nTrim" parameter.

Here's a tutorial on page coordinates:

https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm?sd=40

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often