Hello everyone,
I’m trying to determine the current frame fitting method that has been applied to a selected graphic frame in Adobe InDesign via either AppleScript or ExtendScript/JavaScript.
For example, I’d like to know if the selected frame is currently using:
- Fit Content Proportionally
- Fill Frame Proportionally
- Fit Content to Frame
- Fit Frame to Content
- Center Content
- Content-Aware Fit
Using JavaScript, I can successfully access the frame’s frameFittingOptions object:
var f = app.selection[0].frameFittingOptions;
and retrieve properties such as:
autoFitleftCroptopCroprightCropbottomCropfittingAlignmentfittingOnEmptyFrame
However, fittingOnEmptyFrame appears to return only the default fitting behavior for future placed content, not the fitting operation that has already been applied to the existing graphic.
I’ve also reflected the entire FrameFittingOption object and don’t see any additional fitting-related properties.
My question is:
Does InDesign expose the current fitting method of a selected graphic frame anywhere in the DOM, or is that information not retained after a fitting command has been executed?
If not, has anyone developed a reliable method to infer the current fitting state from the frame and graphic geometry?
Any guidance would be greatly appreciated.
Thanks (as always)
-Jeff