I imported a PDF to InDesign but many pages have different proportions and they didn't fit the InDesign pages so I have to resize each one of them, is there a script or other way to do that (rather than do it manually) they are over 200 pages.

  • I am unaware of an existing script that will do what you want, but this could be scripted Feb 14 at 14:23

1 Answer 1


You can use an Object Style with proper Size and Position Options and Frame Fitting Options.

There are multiple ways to do this. Here's one recipe. You might have to adjust it to fit your workflow.

The description of the method is rather long, but really it only takes a few minutes once you get a hang of it.

Make a new document with the dimensions and margin settings you want.

In the Scripts panel, locate the Application > Samples > JavaScript > PlaceMultipagePDF.jsx script and double-click it.

Choose the PDF you want to place. Choose the current document and click OK to get through two alerts. Choose the page you want to start on (probably page 1) and the script will place all the pages of the PDF on separate pages in the upper left corner at their actual size.

This of course looks a bit messy to begin with.

Now we'll make an Object Style for the frames containing the placed pages which we will later apply.

In the Object Styles panel, make a new Object Style. Double-click it to enter its Object Style Options.

Under Size and Position Options set Size > Adjust to Height & Width. Set the Width and Height to whatever dimensions fit your needs. In this example I have an A4 document with 20 mm margins.

Set Position > Adjust to X & Y. In this example I'm setting the Reference Point to the top left corner, X offset and Y offset to 0 relative to the Page Margin.

Under Frame Fitting Options tick Auto-Fit on, set Content Fitting > Fitting to Fit Content Proportionally. In this example I choose to set Content Fitting > Align From to the center, but you can choose for example the top if you want.

Leave all Crop Amounts at 0.

With the Object Style in place all there's left to do is to apply it to every frame containing a page from the PDF. Since our document doesn't contain any other objects, it's pretty easy.

Open Find/Change and switch to the Object tab.

At Find Object Format, click the Specify attributes to find button and set Style Options > Object Style to [None] (since all the frames placed by the script don't have an Object Style by default).

At Change Object Format, click the Specify attributes to change button and set Style Options > Object Style to the Object Style you've just created.

Click the Change All button to apply the Object Style to all frames in the document.

Now all the placed PDF pages fit neatly to the margins of the document.

You can now change the settings of the Object Style to finetune the appearance of all the placed pages in one go. You might need some space in the bottom for a text which could be achieved by setting a smaller height. Or you might want to align the images to the top instead of the center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.