2 Replies Latest reply on Feb 20, 2015 4:08 AM by Colin Flashman

    InDesign Data Merge / Image Frame Options


      Hi! I am learning Data Merge and am trying to set-up some product sheets using it. I have done pretty well so far but have an issue with the way images are importing into the different image frames. There are a few different image frames on the layout (main product image, tech drawing, tech icons, etc.), and I need each image frame to have different frame options set.


      So far using the general "Frame Fitting Options" for each has worked for all imported images except for my tech icons (which I can get to import correctly if I choose "Content Placement Options > Fit Frames to Images" from the Data Merge side menu --but when I do this, it applies to all image frames on the page and not just the one selected (which does not work overall).


      Is there another option to get the icon image frames to "Fit Frame to Image" automatically without using the Content Placement Options from the Data merge menu? Is there a way to use the Content Placement Options so it works for individual frames vs all on the layout?


      Any help is much appreciated!


        • 1. Re: InDesign Data Merge / Image Frame Options
          Peter Spier Most Valuable Participant (Moderator)

          My instinct is that you will need to do this after the merge, and that it would be easiest to do if you add a script label to that frame in the template so that you can script the resize after the merge. I suggest you ask about this over in the scripting forum: InDesign Scripting

          • 2. Re: InDesign Data Merge / Image Frame Options
            Colin Flashman Adobe Community Professional

            Within the data merge, the frame fitting options apply to all frames that contain variable images, so if you want one variable image to fit image to frame, and another variable image to preserve its size, that cannot be done in the main file, but by manipulating the resulting merge file as P Spier suggests. With Data Merge, there are 8 ways an image can fit inside a frame - see the linked pdf: http://colecandoo.files.wordpress.com/2012/08/framefit.pdf


            This is further complicated when importing ai or pdf images that contain different possible sizes to import (e.g. trim box, bleed box, bounding box, etc). If the "show import options" dialog box is used when placing an image into a data merge file, the settings used in those import options are maintained in the file for the importing of any pdf/ai files via the data merge. What this means is that a data merge containing pdf/ai images can go haywire quickly if the import options change.


            There are some tricks that can be used to control a size of an image in a data merge, provided the images are pdf/ai. If images are being placed by bounding box size in the import options, a way is by drawing a no fill/stroke box behind (or on another layer) of the pdf/ai - this will be used to define the actual size of the image, instead of the top left/bottom right of the image. Similarly, if images are being placed by media box, a similar technique can be used by making the illustrator artboard the size used to define the incoming image size.


            There are also other ways to control the way an image grows/shrinks when importing via the data merge. I have written about that elsewhere, but the trick relies on using making the variable image an anchored object in a larger text frame and controlling its coordinates with text and textbox formatting (e.g. top/bottom/center align; left/right/center, or tab position): Centering “fit frame to images” using InDesign CS6 | Colecandoo!