I've connected DYMO 280 Label Printer to my pc and trying to print labels from my C# .NET winforms application but I'm facing some errors regarding XML tags.
I'm using DYMO Label v8.0 to create a label templates. Can you pls send me some code examples? Most of the examples I've found are really outdated (from 2011,2011).
I've installed DYMO.Label
from NuGet packages and moved the .label
file to my source code.
Below is the code I've tried to print the labels:
var label = Label.Open(AppDomain.CurrentDomain.BaseDirectory + "data\\elsis.label");
label.SetObjectText("productCode", productCode);
label.SetObjectText("productPrice", productPrice);
label.Print("DYMO LabelManager 280");
</StackTrace><ExceptionString>System.Xml.Schema.XmlSchemaValidationException: The element 'TextObject' has invalid child element 'GroupID'. List of possible elements expected: 'HorizontalAlignment'.</ExceptionString></InnerException></InnerException></Exception></TraceRecord>
Exception thrown: 'DYMO.DLS.Runtime.DlsRuntimeException' in DYMO.DLS.Runtime.dll
An unhandled exception of type 'DYMO.DLS.Runtime.DlsRuntimeException' occurred in DYMO.DLS.Runtime.dll
Unable to load label template 'C:\Users\armav\source\repos\Elesis\Elesis\bin\Debug\data\elsis.label'