Hello everyone,
I wanted to talk a little bit today about the DYMO SDKs and compatibility with Windows 8. I’ll start with a quick answer: DYMO SDKs only work with Windows 8 desktop style applications. They do not work with Metro/Modern/RT style applications. Let’s dig a little deeper into why our SDKs do not work in Metro style applications and I will also describe a workaround for printing DYMO labels within a Metro application.
Metro Applications and COM
All of our SDKs use core DYMO assemblies that are installed with DYMO Label Software (DLS). For our older DYMO Label SDK, you add a reference to the DYMO COM objects directly in your application. For our “native” .NET DYMO Label Framework, we’ve created a wrapper assembly that calls our core DYMO assemblies through COM. Either way, COM is a necessary component for our SDKs to work.
Windows 8 Metro/Modern style applications operate under a different set of rules than desktop applications. One important rule being Metro applications are not allowed to access the registry. What does this mean for the DYMO SDKs? As discussed earlier, all Windows DYMO SDKs require COM to function and without registry access the loading of a COM object will fail. This means that, unfortunately, printing a label using the DYMO SDKs in a Metro application is not possible at this time. There is a workaround which requires a bit of work, but I will describe the basic process to get you started.
Workaround
After installing DLS, any time a new DYMO printer is connected to your machine it registers as a standard Windows printer. This means that you can print to your DYMO printer from any application just like you would any other printer. For instance, you could type some text in a Microsoft Word document and print it to your DYMO printer. They key to getting it to print correctly on your label is to make sure the document size you are using in Word matches the label type you have in your DYMO printer.
Following the principles described above, you could create a printable document in your application, place anything you want on this document (text, images, etc.), and print this document to your DYMO printer. The creation of the document and anything on the document is entirely your application’s responsibility since you would not be using our SDKs. What your printable document is depends on what environment you are working in. One example would be an XPS document if writing a .NET WPF application. A great example for creating and printing a document within a Metro application can be found on Diederik Krols blog. Following Diederik’s tutorial and making sure that your document size matches your label size, printing to a DYMO printer from within a Metro application should be fairly straightforward, albeit not as easy as using a native SDK.
Conclusion
Over the past several months, we have received many questions regarding DYMO SDKs and Windows 8 support. We have taken note of this and are currently researching ways to improve our SDKs and provide support for as many platforms as possible. For the time being, we hope that the workaround described above will provide those of you writing Metro applications with a viable method of integrating DYMO printers into your applications.