Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Script need for cropping the pdf files in InDesing

Explorer ,
Sep 02, 2010 Sep 02, 2010

Hi,

I have more than 200 pages pdf file. I need to place all pages in InDesign, skip the 4 sides about 20mm in InDesign. I did placing using of script. I need to crop all pages, is there any script for the same..?

Thanks in advance.

TOPICS
Scripting
657
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Sep 02, 2010 Sep 02, 2010

Hi,

Can you try with below code:

var myDoc = app.activeDocument;
var myGraphics = myDoc.allGraphics;
for (var a = 0; a<myGraphics.length; a++)
{
     if (myGraphics.imageTypeName == "Adobe PDF")
     {
          var myBounds = myGraphics
.parent.geometricBounds;
          myGraphics
.parent.geometricBounds = [(myBounds[0]+20), (myBounds[1]+20), (myBounds[2]-20), (myBounds[3]-20)]
     }
     
}

But make sure your ruler unit should be in mm.

Here is Zanelli script for placing pdf in Indesign.

Shonky

Translate
Engaged ,
Sep 02, 2010 Sep 02, 2010

Hi,

Can you try with below code:

var myDoc = app.activeDocument;
var myGraphics = myDoc.allGraphics;
for (var a = 0; a<myGraphics.length; a++)
{
     if (myGraphics.imageTypeName == "Adobe PDF")
     {
          var myBounds = myGraphics
.parent.geometricBounds;
          myGraphics
.parent.geometricBounds = [(myBounds[0]+20), (myBounds[1]+20), (myBounds[2]-20), (myBounds[3]-20)]
  ...

But make sure your ruler unit should be in mm.

Here is Zanelli script for placing pdf in Indesign.

Shonky

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 03, 2010 Sep 03, 2010
LATEST

Thanks alot Shonky for your great help 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines