【发布时间】:2014-08-23 15:42:54
【问题描述】:
我正在尝试使用 Javascript API 为连续标签制作 XML(我必须使用它们的单元格布局)。
这是我所拥有的:
<ContinuousLabel Version="8.0" Units="twips">
<PaperOrientation>Portrait</PaperOrientation>
<Id>Continuous</Id>
<PaperName>30270 Continuous</PaperName>
<LengthMode>Auto</LengthMode>
<LabelLength>0</LabelLength>
<RootCell>
<Length>0</Length>
<LengthMode>Auto</LengthMode>
<SubcellsOrientation>Vertical</SubcellsOrientation>
<Subcells>
<Cell>
<TextObject>
<Name>TEXT</Name>
<ForeColor Alpha="255" Red="0" Green="0" Blue="0"/>
<BackColor Alpha="0" Red="255" Green="255" Blue="255"/>
<LinkedObjectName></LinkedObjectName>
<Rotation>Rotation0</Rotation>
<IsMirrored>False</IsMirrored>
<IsVariable>False</IsVariable>
<HorizontalAlignment>Center</HorizontalAlignment>
<VerticalAlignment>Middle</VerticalAlignment>
<TextFitMode>ShrinkToFit</TextFitMode>
<UseFullFontHeight>True</UseFullFontHeight>
<Verticalized>False</Verticalized>
<StyledText>
<Element>
<String>Hello World</String>
<Attributes>
<Font Family="Lucida Grande" Size="13" Bold="False" Italic="False" Underline="False" Strikeout="False"/>
<ForeColor Alpha="255" Red="0" Green="0" Blue="0"/>
</Attributes>
</Element>
</StyledText>
</TextObject>
<Length>0</Length>
<LengthMode>Auto</LengthMode>
</Cell>
</SubCells>
</RootCell>
</ContinuousLabel>
我可以向子单元格标签添加更多单元格,但是我需要创建行和列(以及页眉和页脚)
他们的文档说根单元包含单元(子单元),单元可以包含标签对象或其他子单元 (他们的 xml 信息很少) 我找到了他们的 .net 框架文档,据我所知构建了 xml(如果您使用的是 .net),并且他们的 IContinuousLabelCell 有一个属性子单元格。但是我不知道如何将自己的子单元格添加到根单元格以外的单元格中。
这两天我一直在尝试解决这个问题,但我发现没有任何帮助。
所以你可以看到我想要完成的事情:http://jsfiddle.net/snymax/fu5hum81/22/
我已将不同的对象分解为函数,以使其在小提琴中更简单
我确信这会简单得多,然后我正在制作它,如果没有人知道另一种方法,我可以将自定义收据打印到 dymo labelwriter 450
【问题讨论】:
标签: javascript xml dymo