根据新的欧盟法律,每个食品包装标签都必须在成分列表中通过粗体或下划线来概述可能引起过敏的成分.
Due to a new EU law every food packaging label has to outline possible allergy-causing ingredients by either styling them bold or underlined in the ingredients list.
目前我正在通过 ZPL 将标签打印到 zebra 打印机.我检查了 ZPL 手册 1 &2 并没有找到如何以粗体或下划线打印某些内容的方法.有没有办法做到这一点?
Currently I'm printing my labels via ZPL to zebra printers. I checked the ZPL manuel 1 & 2 and didn't find way how to print something in bold or underlined. Is there any way to do this?
示例:成分:水、糖、牛奶、奶酪、巧克力"
Example: "Ingredients: water, sugar, milk, cheese, chocolate"
现在应该:成分:水、糖、牛奶、奶酪、巧克力"
SHOULD BE NOW: "Ingredients: water, sugar, milk, cheese, chocolate"
我目前的成分标签代码是:
My current label code for the ingredients is:
^CF0,15 ^FO13,245 ^FB530,2,,L, ^FH^FD__VAR_INGREDIENTS__ ^FS非常感谢您的帮助,
斯蒂芬
推荐答案下划线 - 使用等宽字体,如 AA、AC、AD、AF 或 AG
To underline - use a monospaced font like AA,AC,AD,AF or AG
使用
^FO350,50^AGR^FDwhatever,milk,butter,salt^FS ^FO340,50^AGR^FD ____ ______^FS这里的下划线在牛奶和黄油下面,您可以通过将 FO 的 X 和 Y 位置修剪几个点(此处为 10 X)来调整偏移量
where the underline here is under milk and butter, you can adjust the offset by trimming the FO's X and Y positions by a few dots (10 X here)
经过进一步调查,我发现
On further investigation, I found
要加粗
使用旧的点阵打印机技巧.仍然使用固定间距字体,重新打印文本,但将非粗体字符替换为空格并将X位置调整1或2个点,重新打印Y位置调整1 o2 2个点.
Use an old dot-matrix-printer trick. Still using fixed-pitch font, reprint the text but replacing the non-bold characters with spaces and adjust the X-position by 1 or 2 dots, reprint again with the Y-position adjusted by 1 o2 2 dots.
^FO350,50^AGR^FDwhatever,milk,butter,salt^FS ^FO348,50^AGR^FD milk butter^FS ^FO350,52^AGR^FD milk butter^FS要下划线,请在所需字母下方绘制一个图形框.这相对容易计算,因为每个字母的宽度都是恒定的.
To underline, draw a graphics box below the required letters. This is relatively easy to calculate since the width of each letter is constant.
^FO345,490^GB0,160,4^FS ^FO345,690^GB0,240,4^FS我使用 A300 和 8"*3" 标签进行了测试,因此我需要旋转文本,因此进行了一些奇怪的计算.即使在示例中,手册也没有显示 ^FS,但我发现它是必需的.
I tested using an A300 and 8"*3" labels, so I needed to rotate the text, hence some odd calculations. The manual does not show the ^FS, even in the examples but I found it was required.
更多推荐
使 ZPL 标签中的文本加粗或加下划线?
发布评论