We are proud to announce the release of DYMO Label SDK 8.3.1. This release contains updated documentation and samples, especially for the new DYMO Label Framework API. The SDK installer is available from here.

Note: do not forget to install DYMO Label software, it is required to run any application that uses the SDK. For more information see this blog post.

This blog post will demonstrate how it is easy to print a label with a QR-code barcode from any .NET application. Even more, it will show how to do that in two different ways. The sample VS 2008 project is available here.

Prerequisites

First, make sure the latest DYMO Label software is installed. It is always available on DYMO web-site, at the time of writing it is version 8.3.1. Next, in Visual Studio create a new .NET project and add a reference to DYMO.Label.Framework assembly. This will make possible to use DYMO Label Framework API in the project.

Use Barcode Object

The easiest way to print QR-code is to use built-in support for QR-code in DYMO Label Framework. First, design your label using DYMO Label software. Unfortunately, DYMO Label itself does not have ability to specify QR-code barcode type in the UI yet. So, add the Barcode object to the label and put it into desired position. Don’t specify the barcode symbology, use the default Code39. Save the label in to a file, open the file in any XML editor and change the <Type> tag to “QRCode”.

First, label is loaded from a file, stored as a resource in the application assembly. Next, the barcode data is set to be the blog’s URL. And finally, the label is printed on the printer selected in the UI.

Use Image Object

Printing QR-code by using Barcode object is easy. The only drawback, it is hard to control the actual barcode size. <Size> tag can be used for that but it support only three predefined sizes Small/Medium/Large, but still the overall size will depend on the actual barcode data. The longer the data string, the larger is the barcode. So, the idea is to use some library to generate QR-code image of desired size, and then print it using the Image object. As before, design a label using DYMO Label software. Put an Image object on the label where the barcode should be printed. Set the Image’s Scale Mode to None to avoid image scaling and possible problems with the scanning/reading of the printed barcode. See BarcodeAsImage.label from the sample project. Then use selected library to generate the QR-code image. When specifying the barcode image size in pixels calculate it based on the printer resolution, that is 300 dpi for LabelWriter printers and 180 dpi for Tape printers. For example, if you want the barcode to be 1” in size, specify the barcode image size as 300×300 pixels. Actuals API calls are very similar to the first case.

First, label is loaded from a file, stored as a resource in the application assembly. Next, the barcode image is “generated”; for the simplicity, already created png file is used instead of library calls. Next, the image data is assigned to the Image object. And finally, the label is printed on the printer selected in the UI.

Conclusion

It is quite simple to print QR-code barcode even if built-in support is somewhat limited. The next post will show how to do the same thing by using DYMO Label JavaScript library.

Please Note

This release is a BETA. It has not been extensively tested outside DYMO and should be used for developer testing only, NOT for production software releases.

What’s New

64-bit Support

Now you can use the SDK from 64-bit processes, e.g. Internet Explorer 64-bit. The only thing to do is to recompile your application to be 64-bit, no need to change any code.

New DYMO Label Framework API

Starting this introduces a new API – the DYMO Label Framework. It provides a simpler streamlined interface for printing labels.

Major Features

Support for 32-bit and 64-bit applications.

Support for Tape printers. Now you can use the same simple API to print on Tape printers as for printing on LabelWriter printers. All you need to do is to design a Tape label in DLS, load it in your application and print.

Native .NET support. The Framework provides native .NET support. There is no need to use COM-Interop anymore. Features available in .NET such as indexed properties, enumerators, etc are used to provide an API that is easier to use.

COM support. Microsoft COM is supported as well, similar to current SDK.

Consolidated High and Low Level API. The Framework combines the current high-level and low-level APIs into a single API. Now there is no need to switch between APIs if you need some advanced functionality not available in high-level API.

Cross-browser and cross-platform JavaScript library – see below.

DYMO Label Framework JavaScript Library

To simplify using DYMO Label SDK from web-based application we created a JavaScript library that abstracts browser and platform details for accessing DLS SDK from JavaScript. Now you can use the same JavaScript code to add printing support for any browser the SDK supports. Currently supported browsers are: