Matt Centa Posted March 18, 2011 Share Posted March 18, 2011 I have an address line were the numbers are one font and the physical address behind it is another font. I do not know how to go about this. It currently forces it to one font. The numbers are Whitney-BookSC and the address is Whitney-Book. 3711 MoPac Expwy. I'm using a Mac 10.5.8 Acrobat 9.4.1 FusionPro 7.1P1c Link to comment Share on other sites More sharing options...
scubajbc Posted March 18, 2011 Share Posted March 18, 2011 One way to do this would be to make 2 rules and divide your address up into 2 different elements... NUMBER RULE position = Field("Address").indexOf(" "); return Field("Address").slice (0,position); STREET RULE position = Field("Address").indexOf(" "); return Field("Address").slice (position); Then just format your NUMBER RULE to Whitney-BookSC and STREET RULE to Whitney-Book. My Rule is looking for the first space in the Address field to decide where to split it. You will have to look at your data and decide if that will work for your specific data or not. Link to comment Share on other sites More sharing options...
Matt Centa Posted March 21, 2011 Author Share Posted March 21, 2011 I would like to be able to keep this as one element and not have to break it up. Is there a way to string these two rules together. to say if it contains a numeric value assign it Whitney-BookSC else Whitney-Book. Link to comment Share on other sites More sharing options...
scubajbc Posted March 21, 2011 Share Posted March 21, 2011 I suppose you could try a rule that loops the length of the field, compares each character to determine what it is, and build some sort of tagged text item with fonts embedded to return. Link to comment Share on other sites More sharing options...
Dan Korn Posted March 23, 2011 Share Posted March 23, 2011 I would like to be able to keep this as one element and not have to break it up. Is there a way to string these two rules together. to say if it contains a numeric value assign it Whitney-BookSC else Whitney-Book. return NormalizeEntities(Field("Address")).replace(/\d+/g, '<f name="Whitney-BookSC">$&</f>');If you give your rule the same name as the data field ("Address" in this example), the rule will be used instead of the field when that variable name is referenced in a text frame. Link to comment Share on other sites More sharing options...
Matt Centa Posted March 23, 2011 Author Share Posted March 23, 2011 Seems to work. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.