Jump to content

Changing a string of characters to a string of graphics


mjlongo

Recommended Posts

I did some searching here but I could not find an example. Only some reference to this approach.

 

I have a postcard job that requires the customers name be printed using a text with special effects like inner and outer glow, shadows, etc. We plan to create this alphabet of graphics in photoshop or whatever then use these to replace each letter in the persons name.

 

I have a rough idea of how I might approach this in Javascript but I was wondering if someone already has some working script that I could leverage to replace each character of the string with the corresponding graphic.

 

Thanks!

Link to comment
Share on other sites

If you have an array of graphic resources named A.jpg, B.jpg, etc, then you could do something like this:

return Field("Name").replace(/(\w)/g, CreateResource("$1.jpg", "graphic", true).content);

But it's going to be tricky to get it right. I think you're going to get much better results by setting this up as an FP Expression template with an Image Characters set, then bringing that into your FusionPro VDP job.

Link to comment
Share on other sites

Thank you Dan. I did managed to get a for-loop with case statements type script to work fairly well but I can see some possible issues with the results from that. I like your idea of the expression template. Unfortunately, I have never used an FP Expression template with an Image Characters set. Can you point me to some resources for doing that?
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...