Indesign脚本:在具有特定段落样式的文本后面设置背景图像
我正在 Indesign 中寻找一种解决方案,以在具有特定段落样式的文本后面设置背景图像。不幸的是我还没有找到。 所以我想也许你可以帮助我编写一个脚本,其中你可以:
指定段落样式(比方说“chapter_head”)
在整个文档中搜索其遇到情况。
剪切找到的项目的文本并将其以相同的样式(或样式的副本)粘贴到新的文本框架中
在文本框架后面加载图片(“small-frame.ai”)
组后面加载一张图片,并将其粘贴到我们剪切文本的位置
对所有找到的元素重复
提前致谢! 编辑: 这里根据要求提供了我的目标的图片
I was searching for a solution in Indesign 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 ("small-frame.ai")
group, and paste it to the position where we cut the text out
repeat with all found elements
Thanks in advance!
Edit:
here as requested a picture of what I am aiming at
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
干得好。
该脚本查找所有样式为“header”的段落,使用剪贴板的内容更改它们(一组:图像+文本“#placeholder#”),然后查找并更改所有文本“#placeholder#”与标题的内容。
之前:
之后:
Here you go.
The script finds all the paragraphs with style 'header', changes them with contents of clipboard (a group: image + text '#placeholder#'), then finds and changes all the texts '#placeholder#' with contents of the headers.
Before:
After: