Skip to main content
Participant
March 30, 2022
Answered

background image behind a text script

  • March 30, 2022
  • 1 reply
  • 1198 views

Hi guys!
I was searching for a solution, to set a background image behind a text with a certain paragraph style. Unfortunately I did not find any yet.
So I thought maybe you can help me out with a script where you:

-assign a paragraph style (let's say "chapter_head")
-search for its encounter in the whole document.
-cut text of the found item and paste it with the same style(or a copy of the style) into a new textframe
-load a picture behind the textframe ("little-frame.ai")
-group, move and anchor it to the position where we cut the text out

-repeat with all found elements

Thanks in advance!

This topic has been closed for replies.
Correct answer NotSure

Hello Mark,

thank you for your offer for help, I got this one solved on stackoverflow.com.

1 reply

m1b
Community Expert
Community Expert
March 30, 2022

Hi @NotSure, sounds like this would be a good use for an anchored object with an object style. Are you familiar with these features of Indesign? I think they might be a great fit for your case. You would set the anchored object settings in the object style.

However, if the focus of your question is about automating the process of finding all the headings and adding the background behind them then yes a script would be necessary I think. Do you have many to do? Or is it otherwise a frequent repetitive exercise?

It'd be great if you could post a before and after example of what you are doing. Then we can see if a script can be made to do it easily.

- Mark

NotSureAuthorCorrect answer
Participant
March 31, 2022

Hello Mark,

thank you for your offer for help, I got this one solved on stackoverflow.com.