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

Detect if image/rect spans multiple pages on spread

Explorer ,
Jun 04, 2021 Jun 04, 2021

Copy link to clipboard

Copied

Hi 🙂

I am looking for a way to determind if an image/rect spans multiple pages on spread, and idealy get the page numbers:

 

Taking the attached image as an example:

The cyan rect would return: page 1

The magenta rect would return: page 1 and 2

 

I was trying something like image.parentPage.documentOffset, but can only  get one page.

TOPICS
Scripting

Views

192

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 , Jun 04, 2021 Jun 04, 2021

One possibility is the following:

(First set the ruler origin to spread)

1. Get the spread that the image is sitting on 

2. If the right-hand side of the image is smaller than the right-hand side of the spread's first page, the image is entirely on that page

3. If the left-hand side of the image is greater than the left-hand side of the spread's second page, the image is entirely on that page

4. If not 1 or 2, the image is on both pages.

 

P.

Votes

Translate

Translate
Community Expert ,
Jun 04, 2021 Jun 04, 2021

Copy link to clipboard

Copied

One possibility is the following:

(First set the ruler origin to spread)

1. Get the spread that the image is sitting on 

2. If the right-hand side of the image is smaller than the right-hand side of the spread's first page, the image is entirely on that page

3. If the left-hand side of the image is greater than the left-hand side of the spread's second page, the image is entirely on that page

4. If not 1 or 2, the image is on both pages.

 

P.

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
Explorer ,
Jun 04, 2021 Jun 04, 2021

Copy link to clipboard

Copied

LATEST

Thank you Peter.

That is a great creative solution 🙂

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