Question
How do you call the actively selected spread length/width in a document, or page bounds?
In a script I am using
var docWidth = Number(app.activeDocument.documentPreferences.pageWidth);
var docHeight = Number(app.activeDocument.documentPreferences.pageHeight);
to get the dimensions of an actively selected page. But I realized this is unsufficient for two-page spreads! The reason is that, when I select a page, I want to draw guides on them. But the spread's ruler goes across both pages instead of re-interpreting the second page as a new, separate page with its own origin.
How do I call the active SPREAD dimensions rather than the page dimensions, so that I can fix this? Or is there otherwise a better way to identify individual page bounds within a spread?
