Label printing in your .NET application with a DYMO LabelWriter 450

I am involved in a side project to create a minor visitor management application. One feature is to print name badges. This post is about my first experience to use DYMO:s LabelWriter 450 and their .NET SDK to communicate with it.

Choice of label printer

Internet is flooded with articles about the best choice of label printers and I have no previous experience with such printers. My choice of a DYMO LabelPrinter was a combination of price, positive reviews, nice design and a .NET SDK. Future will tell if my choice was right.

Dymo offer a couple of different LabelWriters. You can read more about them here.
I picked a LabelWriter 450 for around 70$. As usual with these printer products it is the ink and papers that cost you in the long term. Good news: The Dymo LabelWriters use thermal printing. Bad news: The printer only accepts slightly overpriced DYMO thermal paper labels. These labels come in different sizes and adhesive or not.

You can read and see more about the printer at Amazon, Dymo and Youtube.

 

Install printer

Let’s get started and install the printer. I am on a Windows 8 system.
All software you need can be found at Dymos homepage. You can skip the SDK installation with docs and samples for this test because the Dymo Label Software will install everything you need on your dev machine.

Steps:

  • Install the Dymo Label Software (v 8.5 atm).
  • Plug in the power adapter.
  • Connect the printer to your dev machine with the USB cable.
  • Load the labels as described in the manual.

Test Printer

Steps:

  • Start the Dymo Label v8 application.
  • Select correct label type. My included labels were “large address 36mmx89mm).
  • Select a layout.
  • Click the Print-button.

Hopefully the printer produced a label for you now.

You can read more about what you can do with the Dymo Label application at the product page. We will just use it for creating a label template in this blog post.

Create a label template

Open the Dymo Label v8 application.

  • Select LabelType and use an empty layout.
  • Insert one static header “Text” and two dynamic texts “Address” as showed on the image below.
  • Right click on the dynamic texts, select properties and the advanced tab. Input the reference names as lblFirstName and lblLastName.
  • Finally save the label template on your hard disk with the name ”LargeAddressTestLabel.label”.

 

.NET Application

As I mentioned DYMO includes a .NET SDK we can use to communicate with the printer. You can read more about it and see examples at dymodevelopers. I received great support from the team when asking a question about the SDK.

Steps:

  • Create a WPF solution in Visual Studio (or any other .NET application of your choice. Please notice that the SDK does not support Windows RT apps)
  • Include the label template file you created before in your Visual Studio project and set the copy to output directory property to ”Copy always”.
  • Reference the DYMO.Label.Framework in your Project.
  • Write the following code:
  • You can iterate the result from Framework.GetPrinters() to find out the exact LabelWriter name if you use an other model than the 450.
  • Call your Print()-method from a GUI-button
  • Run the application and the label printer will print a label with dynamic data.

Thats it :)

 

Conclusion

My first experience with DYMO:s label printer and SDK is good. It has been straightforward without any problems. Next step will be to design a nice label template together with a GUI and find out how the printer works for more than just a few test prints.

/Johan
codeblog.silfversparre.com

This Post Has 13 Comments

  1. I can see you are an expert at your field! I am launching a web site soon, and your facts will probably be quite interesting for me.. Thanks for all your support and wishing you all of the success.

  2. I’m really enjoying the design and layout of your website.

    It’s a very easy on the eyes which makes it much more pleasant for me to come here
    and visit more often. Did you hire out a designer to
    create your theme? Excellent work!

  3. How can I connect to remote printer and print using C#.NET dymo label framework? Please it is urgent

  4. Just wondering, Is the software you specified here from Dymo are free for use? Can the SDKs be used for other label printers? I am currently developing a queuing system and might utilize a label printer for this but I’m not sure what brand of printer they will purchase for me.

  5. This code works fine in Windows 7, and 8.1, but in Windows 10 printer prints only blank label

  6. Hi Johan

    Did you complete your visitor management software?

  7. Amazingly easy!!!

  8. How do i set the quantity of labels to be printed? I want the same label to be printed 10 times

  9. How to print .png file in Right roll

    //

    DYMO.Label.Framework.Com.Framework zObjStamp = new DYMO.Label.Framework.Com.Framework();
    // Load Base64 string
    zObjStamp.LoadImageAsPngBase64(xszImagePath);
    // How to load to ILabel above Image Stream?

    //For Laoding .label file below code is useful
    zObjILabel = DYMO.Label.Framework.Label.Open(xszImagePath);

    //My requirement is Endicia will give base64 png data i.e stamp i am using Dymo labelwritter 450 twin turbo in right roll i need to print stamps in DLS v8 we are loading only .label files

    zObjIPrinter = Framework.GetPrinters()[Properties.Settings.Default.SettingStampPrinterName];
    if (zObjIPrinter is ILabelWriterPrinter)
    {
    zObjILabelWriterPrinter = zObjIPrinter as ILabelWriterPrinter;
    if (zObjILabelWriterPrinter.IsTwinTurbo)
    {
    zObjILabelWriterPrintParams = new LabelWriterPrintParams();
    zszPrintTray = Properties.Settings.Default.SettingsPrinterTray;
    zObjILabelWriterPrintParams.RollSelection = RollSelection.Right;
    }
    zObjILabel.Print(zObjIPrinter, zObjILabelWriterPrintParams);
    }

  10. Using framework dll in windows presentation foundation application . print is not working -doesnt hit label writer. help me . giving me dllprinting error.

    1. using windows 10 and VS 2015

  11. Hi
    How do I Reference the DYMO.Label.Framework in your Project?
    Thank you

  12. Hi, how do I Include the label template file you created before in your Visual Studio project and set the copy to output directory property to ”Copy always”.

    Thank you

Leave a Reply

Close Menu