Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Text Styling with Data-Driven Graphics

New Here ,
Nov 01, 2017 Nov 01, 2017

Hello:

I am attempting to import an XML document to my Illustrator (CS6) document while still maintaining the styling. For example, I'm curious if there's something along the lines of adding an in-line tag for styling within the XML. For example, in the following piece from my variable data set, I would like to ensure that "Au revoir!" is bold when the data set is imported into the document:

<Phrases_Goodbye>

      <p><strong>Au revoir!</strong> Goodbye!</p>

</Phrases_Goodbye>

I've successfully mapped all the fields, and have the values changing to what I expect when I load the data set XML, but this is preventing me from being able to send my work along. Any suggestions for how to do this?

Thanks,

Joel

1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Adobe Employee ,
Nov 01, 2017 Nov 01, 2017

Hi Joel,

currently there is no way to make the style of font dynamic. It will be shown in the same style as defined in the document for the object bound to your variable.

Thanks

Anish

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 08, 2017 Nov 08, 2017

You could use an embedded workaround in your Illustrator XML document by putting in your own syntax of tags as part of the text. Then with a post-population script you can change the text styling based on your syntax.

For example, if your text for a variable is such:

<Variable1>

  <p>Lorem ipsum $[style_1]$dolor$[/style_1]$ sit amet, consec</p>

</Variable1>

You can do a bunch of regular expression matching and textRange styling to strip out the tags and only leave 'dolor' with a character style of your choice, or have the script simply apply properties such as textRange.characterAttributes.fillColor

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 08, 2017 Nov 08, 2017

Hello!


Thanks for your response! I'm not particularly familiar with the scripting in Illustrator (I'm a software engineer, so I'm not too worried about the actual scripting part), but do you have any examples / resources you'd recommend using to look into post-population scripts? I'm just not certain about where / how this script could be configured to "intercept" the data contained within the XML document.

Thanks,
Joel

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 08, 2017 Nov 08, 2017
LATEST

In the case of where you simply populate a document, you run the script once after the datasets are input. If you are actually doing the batch processing, you call that script from a menu item.

Check all of my LinkedIn articles, all 15+ of them deal with variable data!

Illustrator Variable Data Super-Advanced Techniques | LinkedIn

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines