Im hoping you can help me with a data merge image issue?
Basically, I want to import icons into a file and then the frame to fit the image so they all but up nicely together.
I have created a text box that contains image boxes so I can make the images align to the right, and as the icons come in, the frame fits to them and they can all sit nicely next to each other (clever ay?)
Now heres the issue im having, I need the images to come in a specific percentage (19.7%) to be precise, as I have used the icons on another template and need to be able to reuse these in multiple varying sized templates. (not creating loads of different sized icons for use with different templates).
It is worth mentioning that all of the images are the same height but their widths are different (Eg some square and some rectangular)
So when I ask it to fit frame to content it brings the image in at 100% (way too big) and if I fit images proportionally then they come in at 19.7% but the frame is whatever it is set in the orginal indesign file.
I have been trying for a few hours now with various content fitting options etc to no avail.
I have uploaded a link here with test data: https://we.tl/gKNpUhmtwY
Can you help!!!?
Thanks in advance
Data Merging images will let you bring the images in, but you are at the mercy of InDesign as to what size those images come in. Put simply, it's determined by the frame fitting rules that are set in the Data Merge content placement options. I've created a poster that describes the various appearances of Data Merge frame fitting here: https://colecandoo.files.wordpress.com/2012/08/framefit.pdf
If an image has to come in at an exact size, I'd recommend either making your frames the exact size and using fill frames proportionally, OR make the logos the exact size in either illustrator or photoshop (whatever application made them) and use the preserve frame size and images setting from Data Merge's content placement options.
With the content placement options, there is one rule to govern all images, so if some images have to fit a frame, then ALL data merge images will end up using the fit to frame rule - different rules can't be applied to different Data Merge images.
I gave Andy's problem some thoughts yesterday and also tested a bit with the data.
As far as I can see there is no solution without using to script the placed image containers in the merged document.
it would require at least a two-step process:
1. An image that is placed that the container fits the image.
2. A scaling action to a required height.
If the frames that are prepared for the merge are anchored this would also require a text frame big enough to hold any placed image from the start. If the anchored image goes in overset because the text frame cannot hold it you have no access anymore to properties like position, width and height and therefore you have problems to scale it.
A script could circumvent this issue by first placing the image not in a text frame, then do the scaling action and afterwards will anchor the container frame at the right position. Other workflows are also possible where the containers are filled with images after the merge that always show the whole image regardless of the size of the template frames before the merge.
True, that approach will work, and I have been working on a pro version of my Data Merge to Single Record script that will not only merge to a variety of formats, but can also run a user-created bespoke script prior to the merge. However, that's still in development and will be a paid item.
That said, I think this solution somewhat over-engineers the problem that could be otherwise solved if the opening poster is more flexible about the brief and makes another set of icons at the correct initial size.
I say this because the OP has already said themselves that it's taken a few hours but to no avail, so if creating the additional logos would have taken less time, then that seems to me to be the option I'd take. If the logos are all Illustrator or Photoshop files, the OP could even use an action in either program to open the logo, select all, resize to 19.7% save the logo with an appended name, close the file and repeat to however many logos were necessary.
Thanks for your time and answers
So we are thinking it is an after creation process either from script or manual intervention?
In my head I imagined that if the image boxes were set to fit proportianaly (so come in at 19.7%) and then the data merge was set to fit frames to images it would all work lovely! But im gathering that indesign data merge over rides any fitting options you set to the actual boxes?
andylowe546591 wrote… But im gathering that indesign data merge over rides any fitting options you set to the actual boxes?
Exactly. Or perhaps better put:
It ignores the fitting options you gave the template frames.
Imagine a world with the double fitting option!
The possibilities would be endless
I forgot to say thank you for the fitting sheet that is a massive help as im always forgetting what works in which way!
Just so that the updated information is present in this thread...
InDesign has FINALLY ADDED a content placement options for "Use Existing" to keep the previewed image's properties when importing in data merge. I tried to pinpoint the exact date they announced it, but the closed I could find is that it appears doesn't appear in Sept. 2021 documentation and does appear in Jan. 2022 documentation.
Thanks, Adobe, for implementing this option!