• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
1

Fit to frame

Community Expert ,
May 06, 2024 May 06, 2024

Copy link to clipboard

Copied

I am typesetting a large  book with a lot  of full page images. I use a special blank master page for this with a single un-anchored frame on each. But when I import my graphics into the frame, the "the fit to frame" feature does not seem to be working. It works in anchored frames, though. Is there some sort of logic to this?


BjĆørn Smalbro - FrameMaker.dk

Views

108

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 07, 2024 May 07, 2024

Thanks for all the good answers! I ended up merely creating a master page with no texflow and inserted that all the relevant places. Worked fine, but odd, though that the fit to frame feature only works on anchored frames.

Votes

Translate

Translate
Community Expert ,
May 06, 2024 May 06, 2024

Copy link to clipboard

Copied

Hi BjĆørn,

Yes, it seems that this works only with anchored frames.

In the online help this feature is desscribed:

Home > Graphics and objects > Anchored frames > Fill and edit anchored frames > Auto-Scale an image in a graphic frame

"This feature scales the image proportionally to fit into its parent anchored frame while maintaining the best possible DPI."

Best regards, Winfried

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2024 May 06, 2024

Copy link to clipboard

Copied

Hi BjĆørn!

 

Does full page mean margin to margin, or a full page bleed, covering the margins?

 

If you mean margin to margin, couldn't you use anchored frames? We could figure out how to handle the anchor so that it doesn't disrupt the layout and you could use an object style to control all of the anchored frames.

 

~Barb

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2024 May 06, 2024

Copy link to clipboard

Copied

This will scale the selected graphic inside of its anchored frame:

 

#target framemaker

main ();

function main () {

    var doc;
    
    doc = app.ActiveDoc;
    if (doc.ObjectValid () === 1) {
        processDoc (doc);
    }
}

function processDoc (doc) {

    var graphic, frame;
    
    graphic = doc.FirstSelectedGraphicInDoc;
    if (graphic.ObjectValid () === 1) {
        frame = graphic.FrameParent;
        if (frame.constructor.name === "UnanchoredFrame") {
            scaleGraphicToFrame (graphic, frame);
            centerGraphicInFrame (graphic, frame);
        }
    }
}

function scaleGraphicToFrame (graphic, frame) {
    
    var xScale, yScale;
    
    // Get the two scale factors;
    xScale = frame.Width / graphic.Width;
    yScale = frame.Height / graphic.Height;
    
    if (xScale > yScale) {
        graphic.Width = graphic.Width * yScale;
        graphic.Height = graphic.Height * yScale;
    }
    else {
        graphic.Width = graphic.Width * xScale;
        graphic.Height = graphic.Height * xScale;
    }
}

function centerGraphicInFrame (graphic, frame) {
    
    graphic.LocX = (frame.Width - graphic.Width) / 2;
    graphic.LocY = (frame.Height - graphic.Height) / 2;
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2024 May 06, 2024

Copy link to clipboard

Copied

If I had a similar requirement, with less than a couple of dozen such pages, I'd be tempted to implement them as separate Master Pages. Each MP would contain a specific full-page image (background or foreground, depending on Body page content requirements). Each Body page would need to have a unique Ā¶format, and all of this tied together via MasterPageMaps.

However, workflow target plays into the selection of implementation, as the images may not flow to all output types.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 07, 2024 May 07, 2024

Copy link to clipboard

Copied

Thanks for all the good answers! I ended up merely creating a master page with no texflow and inserted that all the relevant places. Worked fine, but odd, though that the fit to frame feature only works on anchored frames.


BjĆørn Smalbro - FrameMaker.dk

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 07, 2024 May 07, 2024

Copy link to clipboard

Copied

LATEST

How are you getting a no-flow page mapped in?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines