Copy link to clipboard
Copied
Hello,
I have a document where all the pages and parents are the same size, but when I try to apply a parent page to any page I get the message below.
• Why am I getting this spurious message ?
• Is there some preference setting to avoid this message ?
• Is there some preference setting to have a document that has only 1 page size ?
This spurious message is interrupting scripts and plugins trying to apply a master page.
Very best regards,
Olivier
1 Correct answer
Thank you to everyone for their suggestions.
It turned out that VS was not recompiling one of my .cpp files.
Doing a full rebuild fixed the issue.
Copy link to clipboard
Copied
You have probably resized a page with the page tool and maybe resizd to its original size. You should click on "Use parent page size". This will remove manual overrides which can cause problems and will increase file size.
Copy link to clipboard
Copied
Hi @Olivier Beltrami, I don't know the answer, but does it help to insert near the start of the script:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
I wondered if this might avoid the dialog and choose a default behaviour?
Otherwise, if you don't get a good answer here, please post a simple demo .indd document so we can test with it.
- Mark
Copy link to clipboard
Copied
@m1b Thank you for for post.
There is the equivalent enum in the SDK
enum PageResizeChoice { kResizeToMasterPageSize, kKeepCurrentPageSize, kAskUserForPageResizeChoice};
But it does not seem to make a difference (for the moment, still testing).
Very best regards,
Olivier
Copy link to clipboard
Copied
Another idea is to set the size to match the master before applying it — something like:
page.bounds = master.bounds:
- Mark
Copy link to clipboard
Copied
Thank you to everyone for their suggestions.
It turned out that VS was not recompiling one of my .cpp files.
Doing a full rebuild fixed the issue.
Copy link to clipboard
Copied
Thanks for letting us know, Olivier. All the best.

