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

InDesign Help on using Multi-page PDF script

New Here ,
Oct 28, 2024 Oct 28, 2024

Copy link to clipboard

Copied

Working in InDesign, when I use the script to import multi-page PDF files, I create the new document at the PDF size. Once imported, I change the doc size to the print size. This would typically center the pages, with the new InDesign 2025, that is not happening. Is there a step I am missing?

Otherwise, I have to manually center over 100 pages. 

TOPICS
Scripting

Views

247

Translate

Translate

Report

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

Community Expert , Oct 29, 2024 Oct 29, 2024

I suspect you are using the sample script include with InDesign.

I much prefer using the script you can find at https://github.com/mike-edel/ID-MultiPageImporter/releases which is far more flexible and will allow you to make your file at the finshed dimension and position your placed pages as you like on the page.

Votes

Translate

Translate
Community Expert ,
Oct 28, 2024 Oct 28, 2024

Copy link to clipboard

Copied

Hi @Rian29894798wcpx I just did a test of what you describe (but manually placing the pdf, not with script). When I change the page size to larger, the pdf page(s) are centered. I'm using Indesign 20.0 on MacOS 15.1.

 

Can you try the experiment with a new document and manually placing a page or two? We need to determine if it is something to do with your document, or something the script is doing. Off the top of my head, I can't think of what would cause this. Liquid layout? Post a small demo document if you think it will help—it would be a good test to see if it is just your system, or whether other people have the same results, meaning that it is the document.

- Mark

Votes

Translate

Translate

Report

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
Community Expert ,
Oct 28, 2024 Oct 28, 2024

Copy link to clipboard

Copied

It depends on whether you have facing pages on, and even if not, whether you have a single parent page and not a double.

Votes

Translate

Translate

Report

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
Guide ,
Oct 29, 2024 Oct 29, 2024

Copy link to clipboard

Copied

Does it correspond to your reference point setting (those 9 squares in the left of the control strip, or transform panel)?

Also try LayoutWindow.transformReferencePoint .

Votes

Translate

Translate

Report

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
Community Expert ,
Oct 29, 2024 Oct 29, 2024

Copy link to clipboard

Copied

I suspect you are using the sample script include with InDesign.

I much prefer using the script you can find at https://github.com/mike-edel/ID-MultiPageImporter/releases which is far more flexible and will allow you to make your file at the finshed dimension and position your placed pages as you like on the page.

Votes

Translate

Translate

Report

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
New Here ,
Oct 29, 2024 Oct 29, 2024

Copy link to clipboard

Copied

Thank you, Peter.  That worked brilliantly.  Just what I wanted.  🙂

Votes

Translate

Translate

Report

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
Community Expert ,
Oct 29, 2024 Oct 29, 2024

Copy link to clipboard

Copied

LATEST

I'm not sure if you are changing the page size using a script but, if so, you have good control of what happens:

// double the size of the first page
// keeping content in the center
app.activeDocument.pages[0].resize(
    CoordinateSpaces.PAGE_COORDINATES,
    AnchorPoint.CENTER_ANCHOR,
    ResizeMethods.MULTIPLYING_CURRENT_DIMENSIONS_BY,
    [2, 2]
);

It uses "page coordinates" coordinate space for the transform so it works even with facing pages or multi-page spreads.

- Mark

Votes

Translate

Translate

Report

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