I've been working on a really simple app (or so I thought) to print a label with a simple bar code in it, and some text. I have followed the documentation best I can considering it is vague and rather non-descriptive. Here is my code
public void PrintLabel(string serial_num, string part_Num)
{
var label = DYMO.Label.Framework.Label.Open(AppDomain.CurrentDomain.BaseDirectory + "Barcode.label");
label.SetObjectText("Bar_code", serial_num);
label.SetObjectText("text_box", part_Num);
label.Print("DYMO LabelWriter 450 Turbo");
}
as you can see this is the simplest way I can do things.
I've included the DYMO.Label.Framework
in the standard reference and I have made sure Barcode.label
is in the base directory and is accessible. When I hit the button which has a method leading to PrintLabel it thinks for a second, and the printer does nothing. There are no jobs in the printer stack qued and I cant see anything weird going on in the output log. (see below).
What Am I doing wrong?
'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Project Files\ProductValidationSoftware\ProductValidationSoftware\bin\Debug\ProductValidationSoftware.exe'. Symbols loaded. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Project Files\ProductValidationSoftware\ProductValidationSoftware\bin\Debug\DYMO.Label.Framework.dll'. Cannot find or open the PDB file. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Project Files\ProductValidationSoftware\ProductValidationSoftware\bin\Debug\DYMO.DLS.Runtime.dll'. Cannot find or open the PDB file. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Project Files\ProductValidationSoftware\ProductValidationSoftware\bin\Debug\DYMO.Common.dll'. Cannot find or open the PDB file. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Project Files\ProductValidationSoftware\ProductValidationSoftware\bin\Debug\Interop.DYMOBarcodeLib.dll'. Module was built without symbols. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Project Files\ProductValidationSoftware\ProductValidationSoftware\bin\Debug\Interop.DYMOPrintingSupportLib.dll'. Module was built without symbols. ProductValidationSoftware.vshost.exe Information: 0 : Utils.CreateLabelPrintParams(): printParams == null, creating default printParams based on printer type 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Printing\v4.0_4.0.0.0__31bf3856ad364e35\System.Printing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'ProductValidationSoftware.vshost.exe' (CLR v4.0.30319: ProductValidationSoftware.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\ReachFramework\v4.0_4.0.0.0__31bf3856ad364e35\ReachFramework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.