mjlongo Posted July 14, 2014 Share Posted July 14, 2014 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! Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted July 14, 2014 Share Posted July 14, 2014 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. Quote Link to comment Share on other sites More sharing options...
mjlongo Posted July 14, 2014 Author Share Posted July 14, 2014 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.