View Full Version : Is there a way to Activate a Darwin rule using the Number of charactors in a field?

02-28-2009, 01:07 AM
We have multiple Darwin jobs posted through Kodak Storefront; When a field gets too long and would go to a second line I want it to switch to differnt Layer with tighter Kerning or smaller fonts. This is fairly easy in Yours truely Designer and I have seen it in other VDP apps but I dont see any way to do this in Darwin?. Can it be done Via coding and if so does anyone have a sample I could start from?

Carrell Wiers

02-28-2009, 11:57 AM
Unfortunately, this is a limitation of the current version of Darwin. However, an easy way to get around this is add a field in Excel and have it count the string in question. Then base your rule off that string. Sucks not having a coding engine in Darwin for simple things like this. Hopefully that will be fixed one day :) Copyfit doesn't do the job you are looking for?

03-02-2009, 10:20 PM
Thanks for the Quick response.

The problem with doing it in Excel is that these Items may or May Not get filled in using a Spreadsheet.

Copyfitting, Thats the Autofitting window in Darwin Right? I was checking the Auto fitting options but it seems very limited. It may reduce the text overflow instances a little but certinly will not eliminate them.


03-02-2009, 10:28 PM
Autofit can be used to eliminate most overflow issues if set right. But your point on character length is a big issue. Even character length isn't perfect, if the font is monospace it works, but since we don't see many courier font based designs, the font metrics need to be taken into consideration. If the variable is all caps its going to take up a lot more space metric wise then all lower case. That's why autofit was created, as it takes into consideration the font metrics, kerning, line spacing, font size to fit the text into the box. But it takes a bit of massage to get the fields to work right. Hopefully autofit / copyfit will allow you to get closer to what you want. The manual way to do it is set up a rule that you can just trigger in a field, called longline and set it to 1 if longline and 0 if not, and just set up a Darwin rule to look for this and swap out the layer or page. Isn't perfect, but hopefully it will help you get the job done. Hopefully the Darwin folks will have answer for you as to what might be able to address the issue down the road.