Legend
September 12, 2026
Question
Why does frameFittingOptions become ineffective when the image is pasted into the frame?
- September 12, 2026
- 6 replies
- 35 views
It was effective at the beginning.
I manually dragged it, but running the script afterwards didn't work.
After manually dragging, I tried "Make Frame Fit Content" or "Make Content Fit Frame" respectively, but neither had any effect.
var d = app.activeDocument;
var item = d.selection[0];
frameFitToContent(item);
//frameFitToContent(item.parent);
//contentFitToFrame(item.parent);
function frameFitToContent(s) {
//s.frameFittingOptions.autoFit = true;
s.frameFittingOptions.fittingAlignment = AnchorPoint.TOP_LEFT_ANCHOR;
s.fit(FitOptions.FRAME_TO_CONTENT);
}
function contentFitToFrame(s) {
//s.frameFittingOptions.autoFit = true;
s.frameFittingOptions.fittingAlignment = AnchorPoint.TOP_LEFT_ANCHOR;
s.fit(FitOptions.FILL_PROPORTIONALLY);
}
