Legend
Sep 12, 2026 5:25 PM UTC
Answered
Why does frameFittingOptions become ineffective when the image is pasted into the frame?
- 14 replies
- 97 views
- Translate
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);
}
