5 Replies Latest reply: Feb 17, 2013 4:46 PM by rtouart RSS

    Centering images with Data Merge

    rtouart Community Member

      I'm using Data Merge to place a single image on each page.  I have the frame centered on the page and its reference point set to the center.  I have the Data Merge options set to "Fit frame to content", but when I run the merge all the images align to the top left corner of the frame.  The frame expands or contracts as directed, but I would like for it to expand from the center.  What am I failing to do?

        • 1. Re: Centering images with Data Merge
          Michael Riordan Community Member

          are you setting the reference point in the right place? You need to do this in the Frame Fitting Options.


          hope that helps,

          Michael Riordan

          Adobe Certified Instructor

          Digital DesignLab



          Sent from my iPad

          • 2. Re: Centering images with Data Merge
            rtouart Community Member

            The reference point is set to center in Frame Fitting Options. I tried all the settings within that dialog, but everything except "fit images to frame" knocks the frame off center.

            • 3. Re: Centering images with Data Merge
              Peter Spier ACP/MVPs

              Are your placeholders on the master page? I believe in CS6 there's a bug that prevents assigned frame fitting otions from working with master frames.

              • 4. Re: Centering images with Data Merge
                Colin Flashman Community Member

                I feel the OP's frustration.


                Normally to center an item within a data merge, the controls for that are within the content placement options in the data merge flyout - it's the center in frame checkbox:


                normal way.jpg

                However as the OP has realised, it doesn't work for "fit frame to images" - instead the frame fitting options take the measurement from the top left. There is a workaround:


                1. Create a text box larger than the largest image that is part of the merge. Align the text to be centered not only left and right, but top and bottom (from the text frame options). If done correctly, the flashing cursor should be in the center of the textbox.
                2. Draw a graphic frame anywhere outside of this textbox and then cut and paste it into the textbox. If done correctly the box should be centered within the textbox.
                3. Assign the image field of the data merge to the center box.
                4. From the content placement options, make sure that the fitting has "fit frame to images"


                Voila! it should work.


                Yes, the same thing can be achieved by drawing a frame larger than the largest image that is part of the merge, and then from the content placement options, choosing "preserve frame and image sizes" and having the center in frame checkbox turned on... the advantage with the method above is that the image has its frame around it to the right size that will scale when the image does... the "preserve frame and image size" won't allow this.


                If I'm not explaining myself properly, go to https://dl.dropbox.com/u/55743036/2013-02-17%20centering%20dm%20pics.zip and download the files to see what I mean. Missing links may appear... simply substitute them with the intended data merge.



                • 5. Re: Centering images with Data Merge
                  rtouart Community Member

                  Peter, I thought that might be the case, so I did everything from scratch on a page.  No luck there.

                  Colly, thank you very much.  I ran a test with your files and, sure enough, Bam!, right in the center.

                  Tomorrow I will configure with my files and report back.

                  Again, thanks!


                  Edit: I tried to recreate the page by your instructions, but images still imported to the upper left corner.

                  The second method mentioned worked fine and my images require no scaling. However, I just used the file you provided.

                  Thanks for the help!  I'm quite grateful.