2

I am working on card game with many, many cards. These cards have variable icons on them (example: some cards have the moon icon and some don't) I am using data merge to place the images where needed and all the game text. These icons sometimes are in the text area and sometimes not. When they are in the text area I would like them to have a text wrap so the text does not overlap the icon. When there is not an icon present I would like the text to flow across the text area. I have added some images to show the cards with the icons and text overlap and how they should look when no icon is present.

Hope this makes sense and is possible, as it will save me tons of time laying up these and future cards.

bottom Left shows overlap, top left show regular text across the text area

5
  • The one place where Illustrator data-merge is more intuitive (should I say, the visibility variable portion of that which has the effect of hiding/showing an art object). I tried to experiment with using an all-transparent PSD or PNG as the blank placeholder, setting all kinds of text wrap to the placed image files, mainly Alpha Channel, but it seems to act like the whole image is opaque when in fact its all transparent. Maybe someone has the answer to this.
    – Silly-V
    Mar 7, 2017 at 21:28
  • It would be helpful to see what the merge document looks like as well as the final merged cards.
    – magerber
    Mar 8, 2017 at 2:19
  • Ultimately what I am looking for is a way to have the text wrap there when an icon is there and gone when there is not. Mar 8, 2017 at 2:31
  • Magerber, do you mean to see an image of what I want the end cards to look like and not what I am currently getting? Mar 8, 2017 at 3:00
  • I am not sure you can do it with datamerge itself but a script could combine your merge and do the final adjustments.
    – Loic
    Mar 9, 2017 at 8:45

1 Answer 1

1

This is quite tricky but seems to be doable (successfully tested with CS6)

The idea is to apply “Wrap Around Object Shape” option to your icons instead of “Wrap Around Bounding Box”. So, if there’s no image, no wrapping either.

First create an object style for your icons frames. (You could also work with Wrapping options directly, but I find this way more handy). Go to the Text wrap options, and set “Wrap Around Object Shape”. In my example below, I used .AI files so I set up “Same As Clipping”. Adjust options if necessary.

Now, follow the steps in the right order, because it’s a bit of a cheat:

  • First Check Preview in your Data merge window: that’s very important!
  • Create an image frame, place the variable by clicking on the image field in your Merge data window.
  • Then apply the “Icon” Object Style previously created.
  • Now, this is important: select your image frame and make sure the “wrapping” stroke does NOT appear. If so, Alt + click on the Object Style. It should disappear.
    enter image description here
  • Finally, just duplicate frames and assign other icons fields. I tested it, and it works for me.

Here’s the example:
enter image description here

Finally, this works but your text is now off-centred. We could find this not so aesthetic.
Here’s a trick to get same “padding” space on the left than on the right: the idea is to duplicate your icons, to place them on a layer that will be invisible (make sure the “Don’t wrap text while not visible” option is NOT checked) and set them left:

enter image description here

6
  • That's wonderful that it works with the AI files! Maybe my problem was I used raster files. I need to try this again!
    – Silly-V
    Mar 9, 2017 at 19:18
  • Raster images are fine too. Your "problem" is normal indd behaviour really. Let us know if it works now
    – Vinny
    Mar 10, 2017 at 5:43
  • Ah, my method was to use a blank image when there would be 'no' image, but using data merge actually removes the entire image. In the less-optimal way, Illustrator complains about a file not being found. My problem was that I expected a fully transparent image to have no impact on text, but it looks like just the opposite happens. I looked at the preview of an all-transparent image in my Windows preview panel and it's an all-black square. However when I put a dot of color and save, it turns into a white background with that dot now present. Hmm.
    – Silly-V
    Mar 10, 2017 at 14:50
  • @Silly-V I'm not sure I understand what you're up to. (You say Illustrator but meant indesign right? Let it complain ^^) Maybe we could continue this in a chat room but I don't know how to open one.
    – Vinny
    Mar 10, 2017 at 15:06
  • No, I meant AI because I'm just so used to its behavior regarding this feature. To replicate my problem, save an all-transparent .png and instead of using no image, use this blank image as an image. And it will think the all-transparent image is fully opaque. However, I didn't consider that indesign deals with no-image (where image is not specified in record, or isn't found?) so well!
    – Silly-V
    Mar 10, 2017 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.