Episode 7: Data Merge – Alignment and Fit Frame to Image

Welcome to this episode of Colecandoo. In this episode, we’re going to show you how
to align variable data images that use the “fit frames to images” option. Typically, they will only align to the top
left of any image, but in this case, we’re going to show you how to align them, in this
case, to – say – the bottom right, which is something that you can’t normally do. So as we scroll through the records here you
can see that that’s happened. So I’ve got a sample file here, that’s just
got some dummy text and it has my placeholder for the variable images. Now, I don’t have any variable images at the
moment, but if I want to get them very quickly from a folder, there’s a good script from
Ozalto, which is run by Loïc Aigon, and it’s called “imagestocsv”. This, i think, may be a separate version,
but have a look at his website, the link is in the description below. Just going to load that… OK, so that’s made our links for us. So it just puts a name of the image, and also
what the image is. Just going to drag that there… …and with my “Content Placement Options”, I want the frames to actually fit the images,
so the images are going to make the size. But here’s my problem. I actually want the image to
line up to this corner, I don’t want it to line up to this corner. So, if we just move the image over here, that’s fine for this record. We go to the next record, and you can see that
it’s not lining up again. You can see it isn’t lining up. So, let’s go to another record… …OK, you get the idea of what’s going on. So this is just how InDesign’s Data Merge
behaves. It always lines up to the top left. It doesn’t matter if you have “Centre Image
in Frame”, that makes no difference. All that will do –
– if I change my Content Placement Options to something a bit different, such as Fit
Images Proportionally for example, and then have “Centre in Frame” and I’ll just adjust
the size of this so you can see it happen, then it centres it within the frame itself,
but it doesn’t actually centre the frame in the space on the page, it always lines up
to the top left. So I’ll just put those options back… …Fit frame to images, and Centre in Frame. So, how do we get our variable image to line
up to the top right hand corner? Well, we cheat, that’s what we do. So, what I’m going to do is
I’m going to make a text box – it’s going to be a very large text box. OK, turn my preview off for this trick… So I’ve made a text box,
I’m then going to cut this, go back to my text tool, and going to paste this in as an inline graphic. What I can then do is I can then right align
this, you’ll see that I’ve done that here, and now it right aligns. But every so often, I will get an image that
is bigger than this text box, and when it does that, the image is going to overset and
go missing, so how do you get rid of that? The answer is you go into your Text Frame
Options, and you go auto-size, and you go auto-size height and width, and you tell it
where you want it to get its size from, and in this case it’s going to be the top right
hand corner. Preview… go OK. So now we can cycle through every record here. Now, let’s say we wanted to line it up to
the bottom. Just going to put a guideline here… First thing to do is turn the preview off. Just go back to my text frame options, auto-size,
I’m going to change that to the bottom right, and what I can also do as added insurance
is align that to the bottom of the frame. OK, I’m going to move the image down… Sorry, you have to be very careful when you’re
grabbing this too, you want to make sure you’re only grabbing the text, not the image inside. So now, we go to our preview, There we go. So that’s a technique that I hope you’ll be
able to use going forward with Adobe InDesign. That’s it for the video. You can get in touch with me via twitter @colecandoo,
check out the blog colecandoo.com, and see my articles at indesignsecrets.com,
as well as all of the usual terrific content. Until we meet again, I’ll see you later.

2 thoughts on “Episode 7: Data Merge – Alignment and Fit Frame to Image

  1. You seem to be an expert at advanced date marge. Would you mind if I inquired about some contract work? I have a project which might need additional scripting and was wondering if you'd be interested in talking about the opportunity.


Leave a Reply

Your email address will not be published. Required fields are marked *