Page 1 of 1

Dynamically Change Label When Text Too Small

Posted: Thu Dec 20, 2018 1:35 pm
by ryanp
We are evaluating software to replace our internally developed application for printing food labels. We have over 2000 products that we translate into 5+ languages. We have 4 different label sizes S, M, L , XL and dynamically calculate which size works for a specific product in a specific language and makes sure that the font size is not too small or too large.

In simplified terms we do the following:
- send data (translated ingredients, nutrition data, ..) to label software with label size (name of label) and largest font size
- label is filled and formatted in the background (basically print preview)
- the size of the text box (expands to fit text) with the ingredients is measured
- if the box has expanded too much then throw label size error
- if a label size error is returned repeat with the next smaller font
- if the label size error is returned and the smallest font was used then repeat with the next largest label and the largest font size
- iterate until a label and font is found where the text box does not expand beyond the dimensions of the label

Not extremely elegant but it works. Is something similar possible in Nice? It does not need to be this exact approach.

We have a simple MS Access front end where our users scan the barcode of the product, select the language and enter how many cartons of the product need to be labeled. We would like to continue using this and then send an Api call (.Net) to Nice.

We have some internal experience with vbscript but if python is required we should be able to manage.

Thanks in advance for any input.

Re: Dynamically Change Label When Text Too Small

Posted: Thu Dec 20, 2018 3:04 pm
by Kyleodonnell
RyanP

It may be possible to check on the size of an object then switch to a different label file, or use the variable label size option here https://www.nicelabel.com/resources/fil ... ide-en.pdf on page 99. It would allow for a labels length to change depending on the size of the objects. You would need to speak with our sales team at Sales.americas@nicelabel.com as they can put you in touch with a pre sales engineer who can see if this is possible.

Re: Dynamically Change Label When Text Too Small

Posted: Thu Dec 20, 2018 3:44 pm
by ryanp
Thanks for the quick reply. The variable labe size might help for our L and XL as the XL is only longer with more space for ingredients. Our S and M labels are not as wide so the nutrition table is positioned differently bottom vs. side of label.

Is it possible in NiceLabel to check the font size of an object? For example if I understand correctly the Text Box can scale the font to fit the size of the box (Fit content by adjusting font size). Would it be possible to check the font size and then if it is too small throw an error, or maybe this is already standard.

On page 111
"NOTE: If the content amount exceeds the object size, an error message appears. The label is
not printed. To suppress such error and print the text box, enable Ignore excessive
content at print."

If this error can be caught and returned to the program calling NiceLabel I could then advance to the next larger size and call NiceLabel with the next size?

Edit: had wrong parameter Fit content by scaling font:

Re: Dynamically Change Label When Text Too Small

Posted: Thu Dec 20, 2018 10:59 pm
by Kyleodonnell
Ryanp,

You can use our SDK to be able to tap into all of the object's properties to get font sizes and such. The SDK samples get installed here C:\Users\Public\Documents\NiceLabel 2017\SDK\Samples, the SDK help file is located here C:\Program Files\NiceLabel\NiceLabel 2017\Help\SDK

Re: Dynamically Change Label When Text Too Small

Posted: Wed Jan 02, 2019 12:34 pm
by ryanp
Thanks for the info! I was looking for more info on the SDK. Guess it's time to get at test license and start "playing" around.

Re: Dynamically Change Label When Text Too Small

Posted: Wed Jan 02, 2019 2:10 pm
by Kyleodonnell
Ryan,

The demo of the software comes with a free 30 day trial of the SDK

Re: Dynamically Change Label When Text Too Small

Posted: Fri Jan 18, 2019 2:26 pm
by ryanp
We're still testing but have a working Beta Version from what we wanted to achieve.

Basically we set the limits we want in the Text Fit font size then using the SDK we preview the label sending the contents in the request. The SDK throws an error that the text is too long so then we then close the preview and try the next larger sized label and repeat until no error is thrown.

Maybe that helps someone with a similar requirement.