Skip navigation
Currently Being Moderated

Indesign fitting image after placing

Jun 1, 2010 9:43 AM

I've gotten pretty far with using frame fitting options on image frames that are "loose" on a layout. But for image frames that are anchored in text is where I am failing, though Indesign does not present an error.

 

I start with a document with some text. And I anchor a labeled image frame into a certain point in the text.

 

I can place the image, but scaling and the frame fitting options just don't do anything that I can tell.

 

 

set imgValue to "Assets:Signatures:AC_Vierra_sig1.tif"
tell application "Adobe InDesign CS4"
     tell document 1
          set allRect to (every rectangle of every story whose label is "CS46Signature")
          if (count of allRect) > 0 then
               repeat with thisRect in allRect
                    tell thisRect
                         set fitting alignment of frame fitting options to bottom left anchor
                         place imgValue 
                         redefine scaling to {1.0, 1.0}
                    end tell --ax
               end repeat --drill down into img frames in text
          end if --allRect not empty
     end tell --theDoc
end tell --app
 

 

I've tried different combinations of these and they fail without error. What would you do given anchored image frames? thanx, sam

 
Replies
  • Currently Being Moderated
    Jun 1, 2010 3:54 PM   in reply to sam452sam452

    Can you explain what you are actually trying to do to the image?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 1, 2010 6:27 PM   in reply to sam452sam452

    You're getting scaling because presumably that's how your anchored item options are set up in the document. Meanwhile your simplest approach is probably to place the image, fit given content to frame, set the transform reference point of the layout window to bottom left, then set horizontal and vertical scale to 100%.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 3, 2010 9:22 PM   in reply to sam452sam452

    You're doing things the hard way. First, set the transform reference point outside your loop:

     

     

       set transform reference point of layout window 1 to bottom left anchor

     

    Then inside your loop, just do this:

    set {thePic} to place imgValue on thisRect

    fit thePic given content to frame

    set properties of thePic to {horizontal scale:100, vertical scale:100}

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2010 4:41 PM   in reply to sam452sam452

    Try changing:

     

    set properties of thePic to {horizontal scale:100, vertical scale:100}

     

    to:

     

    set properties of thePic to {absolute horizontal scale:100, absolute vertical scale:100}

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 8, 2010 4:23 PM   in reply to sam452sam452

    The place command returns a list (of one item). By using brackets, the variable contains the item from the list.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points