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

93

Likes

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

Adobe Community Professional , 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.

Likes

Translate

Translate
Adobe Community Professional ,
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.

Likes

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 🙂

Likes

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