Format Text Box Data S’abonner

0
Avatar
Legacy Poster

Hi,

 

We have been using Bar Tender for a long time now (version 9.01) however the labelling regulations across Europe have become much more oneorous on the way data needs to be presented on the label as a result this will means the data will require formatting applied to it.

 

One of the fields that we have is a text field which shows our ingredients list which is placed on the label. At the minute it reads the data in from a csv file which has the full ingredients listed in with no formatting so was a simple matter of take this field in the csv file and print here on the label.

 

Now we have present that data as such:

 

Ingredient One Name Bolded (newline)

Ingredient One's Ingredients (newline)

Ingredient Two Name Bolded (newline)

Ingredient Two Ingredients (newline)

etc, etc until basically there is no more data

 

The file will look like this:

 

"some data not included in this field","Ingredient One Name Ingredient One Ingredients Ingredient Two Name Ingredient Two Ingredients etc"

 

The ingredient field is always the last field in the csv file and each field in the csv filed is always surrounded with "" in order to ensure that , within the fields are misinterpreted.

 

My guess is that in order to be able to apply formatting to the text there will need to be some way for bar tender to identify it so that it knows to apply the format the text and when to take newlines so if I was able to reformat the download so that the final field looked like this:

 

"#!Ingredient One Name#! *^Ingredient One Ingredients*^ #!Ingredient Two Name#! *^Ingredient Two Ingredients*^ etc"

 

So basically anything that starts with #! has bold text applied until such times as it hits #! again when a newline is then applied. Anything with  between *^ tags is plain text but new line taken at end of that section.

 

If I get the data in that format is it then possible to format the text the way I need it within one field on the label and if so how do I even begin to work out how to do that?

 

If it isn't is there any way to achieve this with our software?

 

Many Thanks

4 commentaires

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I take it from the lack of replies this will not be possible within BarTender. Would that be correct?

0
Avatar
Michael Toupin (mtoupin
Actions pour les commentaires Permalien

If the data doesn't have some sort of delimiter to tell it where the different lines would start than there's really not any way for BarTender to know that. Now if you do get the delimitation in there, you will still need to be able to parse that data into separate strings to be able to achieve the formatting that you're looking for. Probably the easiest way to do that would be VB scripting. Now the 9.01 version doesn't support different font information in a single text object, so your options are get to version 10.1 which does support that or put them as separate text objects on the label and populate them via scripting.
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I've got some way towards sorting this as I can break the field up and add carriage returns where I want, denoted by a character sequence which for illustation is %# so that whereever that string is seen it replaces it with a control sequence to force a carriage return:

 

Value = Replace(Value, "%#", Chr(13))

 

However as you say you can't do formatting of text in this version of BarTender however I have seen that in later versions HTML tags can be parsed therefore <b>text to be bolded</b> so it looks I should be able to achieve what I need in later versions so long as the HTML and vbScript don't clash. 

 

Am I correct in this?

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

OK I've downloaded a later version to demo and I am now able to everything that I require using html tags alone, namely <b> </b> bolding, <u> </u> underlining, <i> </i> italics and <br/> for new lines. Fairly simple when you have the right version. Should be easy enough to output the data with the required tags or at least script into the right format if it won't play ball.

Vous devez vous connecter pour laisser un commentaire.