DYMO has just released a beta version of DYMO Label Framework – a new set of APIs to work with DYMO LabelWriter and LabelMANAGER printers. In this post we will briefly look at different parts of the Framework.
Installation
All needed libraries and binaries are installed by DYMO Label v.8 installer. On Windows you will need to install version 8.2.3.1026 or later available on http://download.dymo.com/download/Win/DLS8Setup.8.3.1.1332.exe http://www.labelwriter.com/software/dls/win/DLS8Setup.8.2.3.1026-BETA.exe. Note: THIS IS A BETA VERSION for developers only. Please don’t install it on customer’s machines. On Mac DYMO Label version 8.2.2.1173 or later should be installed. It is available on http://www.labelwriter.com/software/dls/mac/DLS8Setup.8.2.2.1173.dmg. Documentation and samples are installed by DYMO Label SDK installer available on http://www.labelwriter.com/software/dls/win/DYMO_Label_v.8_SDK_Installer.exe.
APIs
The Framework supports the following environments: .NET, COM, and JavaScript. The .NET and COM APIs are similar to high-level and low-level SDK APIs in the current API. JavaScript is a new API to be used from a web-browser.
.NET
The Framework itself is almost completely written in C#, so .NET is “natively” supported. To start using it just reference DYMO.Label.Framework assembly. Below is a simple example shows how to print an address label.
var label = DYMO.Label.Framework.Label.Open(@“c:\Address.label”); label.SetObjectText(“Address”, “DYMO\n828 San Pablo Ave\nAlbany CA 94706”); label.Print(“DYMO LabelWriter 450 Turbo”);
A compete C# sample is available on DYMO Label Framework/samples/C# Sample subfolder of the SDK installation folder. A VB.NET sample is available on DYMO Label Framework/samples/VB Sample subfolder.
COM
Thanks to .NET-to-COM-interop, Framework can be used from any language/platform that supports COM, e.g. Visual C++, Delphi, or VB6. The API is similar to the .NET one. E.G. the above example in C++ will look like this:
#import “DYMOLabelFramework.tlb”
using namespace DYMO_Label_Framework;
IFrameworkPtr framework (__uuidof(Framework));
ILabelPtr label = framework->OpenLabel(L“c:\\Address.label”);
label->SetObjectText(L”Address”, L“DYMO\n828 San Pablo Ave\nAlbany CA 94706”);
IPrintParamsPtr printParams = abelWriterPrintParams(__uuidof(LabelWriterPrintParams));
label->Print(framework->GetPrinterByName(L”DYMO LabelWriter 450 Turbo”), printParams);
JavaScript
Prior to the the introduction of the Framework API DYMO had limited support for accessing printers from web-browsers. Although major browsers (IE, Firefox, Safari on Mac) were supported, the burden of browsers’ incompatibility was on the developers side. That has changed now. Not only more browsers are supported now (IE, IE 64-bit, Firefox, Chrome, Opera, Safari on Windows, Safari on Mac) but the Framework provides a cross-browser and cross-platform pure JavaScript API. The above samples will look like this (in any supported browser):
$.get(http://myserver.com/Address.label, function(labelXml)
{
var label = dymo.label.framework.openLabelXml(labelXml);
label.setObjectText(“Address”, “DYMO\n828 San Pablo Ave\nAlbany CA 94706”);
label.print(“DYMO LabelWriter 450 Turbo”);
});
Note 1: using of jQuery library ($.get function) is just for this sample only. The Framework JavaScript library itself does not have dependencies on any other libraries.
Conclusion
DYMO Label Framework allows easy label printing in many different environments. The APIs provided by the Framework will be explored in more detail in upcoming posts.

Hi Vladimir, I’m trying to integrate your example into a web app I’ve been working on but when I run you code locally, it can’t find the Dymo printer. Your sample works and find the printer just fine. Any ideas what I could be missing?
Comment by John — October 14, 2011 @ 2:39 am |
Could you be more specific about what sample are you trying to run? In what browser? OS? Thanks.
Comment by Vladimir — October 14, 2011 @ 7:42 am |
I’m trying to run the sample code outlined here: (http://labelwriter.com/software/dls/sdk/samples/js/PrintMeThatLabel/PrintMeThatLabel.js) and is so far hasn’t worked in any browser, but only when run locally. Running the sample here: (http://labelwriter.com/software/dls/sdk/samples/js/PrintMeThatLabel/pl.html) works in chrome, firefox, and IE9 just fine and prints to the 450 printer i have connected, but in those same browsers when running locally, and using only the example provided as is (with the exception of course of creating the controls to which the script referrences) it always fails to detect the dymo printer. The sample detects two, the dymo labelprinter 400 turbo I installed first, and the dymo labelprinter 450 that i have connected now, but the locally run version doesn’t detect either.
Comment by John — October 14, 2011 @ 10:41 pm |
Most likely you forgot to create a local copy of one of the js files referenced from the html file. Do you have “cookie.js”, “base64.js”, “jquery-1.4.3.min.js”, “dymo.label.framework.js”,
“PrintMeThatLabel.js”?
Also, as a side note, the sample you are using is from BETA version of DYMO Label Web SDK. It requires a BETA version of DYMO Label software and might not correctly/fully works with a production versions of DYMO Label. Unless you are evaluating that beta version, I would recommend using the released version of DYMO Label Framework JavaScript library and corresponded samples.
http://developers.dymo.com/2011/10/07/dymo-label-framework-javascript-library-1-2-4/
http://developers.dymo.com/2010/06/17/dymo-label-framework-javascript-library-print-multiple-labels/
http://developers.dymo.com/2010/06/02/dymo-label-framework-javascript-library-samples-print-a-label/
http://developers.dymo.com/2010/06/11/dymo-label-framework-javascript-library-samples-label-preview/
Comment by Vladimir — October 15, 2011 @ 1:01 am |
Sorry, I am running a windows 7 64bit pc.
Comment by John — October 14, 2011 @ 10:50 pm |
Hi Vladimir.
I have a Ruby on Rails app delivering the label definitions (asset.label, tag.label and parent.label) to the browser’s JS, and the framework is doing a great job rendering it. There is an addition I’d like to ask about. I want to be able to set an ImageObject’s URL in this same manner. Does it do that?
Thanks for this excellent documentation on a very impressive JS framework!
-Matthew
Comment by Matthew — September 15, 2011 @ 5:02 am |
You can do it by encoding your image on the server using base64, passing the image to the browser in the same way as labels, and then calling label.setObjectText()
from http://labelwriter.com/software/dls/sdk/docs/DYMOLabelFrameworkJavaScriptHelp/symbols/dymo.label.framework.ILabel.html#setObjectText
Sets the text content for an object. The content and/or text formatting are set differently depending on the object type.
Address object – The formatting is applied on a line-by-line basis (using list).
Text object – The formatting of the current first character is applied to all text.
Barcode object – The barcode text.
Image object – The base64-encoded string of image’s PNG stream.
CircularText object – The object text.
Date and Time and Counter objects – The object’s ‘Before’ text.
Other objects – An empty string.
Comment by Vladimir — September 15, 2011 @ 5:07 am |
a working example http://labelwriter.com/software/dls/sdk/samples/js/VisitorManagement/VisitorManagement.html
Comment by Vladimir — September 15, 2011 @ 5:08 am |
I love Dymo printers. The API is awesome and worked great in 7, now with 8, the show() does not bring up the app.
I can launch the app fine from the command prompt.
I can load a label, populate it, and print it.
Just not show() so they can lay it out.
My code returns .null. from the show method.
Using win7 on about 8 machines. Once 8 is installed it breaks it, even if 8 is removed.
if oDymo.OPEN ( lcFileName)
oDymoLabel.SetField ( ‘Text’, lcTxt)
oDymoLabel.SetField ( ‘Side’, lcTxt)
IF lnQty = 0
lnRet = oDymo.SHOW() && preview the label
INKEY(1)
ELSE
* This works!
lnRet = oDymo.PRINT2( lnQty, .T., lnSide ) && 0 left, 1 right, 2 auto
ENDIF
ELSE
msg(‘Dymo could not be opened’)
endif
Comment by David Hodgson — September 7, 2011 @ 10:11 pm |
IDymoAddIn.Show() is one of few methods are not supported by DLS8 (other includes IDymoAddIn.Hide(), IDymoAddIn.SysTray(), and IDymoAddIn.Quit()).
Comment by Vladimir — September 7, 2011 @ 10:21 pm |
I need to beable to print to a network print using the above code.
Works Perfect
label.Print(“DYMO LabelWriter 450 Turbo”);
But when I try to print to network printer
label.Print(“\\PC NAME\DYMO LabelWriter 450 Turbo”);
It errors out saying it cant find the printer.
Am I missing something or does it not support network printing?
Comment by Rouse — August 27, 2011 @ 3:14 am |
Printing to a network printer is supported. The printer should be shared on the “Server” machine, and also added as a printer on the local machine (so, it is available in the printer list/ Devices and Printers panel). To make sure your local machine is configured properly, try to print using DYMO LAbel Software – if the printer is in th elist of printers, you will be able to print using the Framework as well. To get a list of available printers you can use getPrinters() method.
Comment by Vladimir — August 27, 2011 @ 3:21 am |
Yeap worked, turns out the networked PC didnt have the latest Dymo V8 installed. Thanks for fast response!
Comment by Rouse — August 27, 2011 @ 4:54 am |
OK, so you can fill the LabelSet, but it cannot be read except via the PrintLabelSet method itself. Am I correct?
My intention is to be able to see how many labels there were and to display their contents as a Debug.Print that would take the place of the actual PrintLabelSet for the tape printer. That way I don’t waste millions of dollars in tape media while debugging my main program. If I was going to make my own label print queue that would be deferred to sometime in the future, then I would use an Access table, but that is not my intention.
It seems logical, IMHO, that this should be part of your framework. If Labelsets are supposed to be emulating Recordsets, I would expect to be able to write and read members of those records. But it looks like that is not the case.
——————-
One more item of note: when I was finishing my code to print tape labels on the Duo, I had copied chunks of my code from the paper (upper) Barcode label sub. The one thing that I forgot to change was the label name when I fetched the XML label.
The two variable names for the text fields I used on the tape label were completely different than the text fields defined in the XML for the Barcode label that I fetched. Yet, when I did an .AddText, it happily carried on with no error messages from the framework or the OS. When it got to the PrintLabelSet statement to actually print the labels, it did nothing and again no error messages were generated. Thankfully, it did not try to print reams of garbage. But why were no error messages generated when trying to print text fields using the wrong name realtive to the XML label file??
—————————————————————————–
Thanks again for your time & support!
Comment by Greg O'Drobinak — April 22, 2011 @ 6:54 am |
Vladimir:
I have no issue with adding text to labels, it works fine; I checked it:
Set LabelRecord = LabelSet.AddRecord()
Call LabelRecord.AddText(“Warehouse”, strWarehaus)
Call LabelRecord.AddText(“Shelf”, strLoc)
Now let’s say I created 22 records of label variables. I want to be able to index into the records of created label text and extract the contents of each label text record and then print it:
Dim dbs As Database, rst As LabelSet
Set dbs = CurrentDb
Dim ware, shelf as String
Set rst = dbs.OpenRecordset(“–label data?-what goes here?-”) ‘Is ther an “OpenLabelSet” ?
rst.MoveFirst
Do While Not rst.EOF
ware = rst.GetText(“Warehouse”)
shelf = rst.GetText(“Shelf”)
print ware, shelf
rst.MoveNext
Loop
So this is what I want to do. Can you give me an example, please?
Thanks!
Comment by Greg O'Drobinak — April 22, 2011 @ 4:35 am |
LabelSet is not designed to be a universal data storage. It is designed to store data to be printed immideately. So, you populate it with the data you are going to print right away, not with ALL the data you can print sometime in the future. Because of that there is no way to retrieve or modify data in the data set. For a permanent storage you can use Access tables themselves.
Comment by Vladimir — April 22, 2011 @ 4:47 am |
Hi! Once the labelset records have been created using the VBA code structure you provided, how can one print out the parameters stored in all of the labelset records?
I see the ‘.AddTExt’ puts a text item into a record, but I don’t see any way to read the items out of each labelset record. I need to do that to debug my code before wasting tons of labels.
Thanks for your help!
Comment by Greg O'Drobinak — April 21, 2011 @ 11:07 pm |
you can use LabelSetBuilder.Xml property to get xml representation of the whole label set.
also, make sure to specify object names exactly as in the label files. They are case-sensitive, so ‘TEXT’ and ‘Text’ will refer to different objects. E.g. if in the label file the object’s reference name is ‘Text’, you should use something like
record.SetText(“Text”, “Hello, World!”) but NOT
record.SetText(“TEXT”, “Hello, World!”) or
record.SetText(“text”, “Hello, World!”) or
Comment by Vladimir — April 22, 2011 @ 12:33 am |
Hi!
If the NET-to-COM-interop actually is working, how does one set up the version 8 API/framework within VB6 or VBA?
Please, I/we need some concise documention and examples. I don’t know C- code and I need to get this new ver. 8 DLS working in MS Access VBA.
BTW, I have DLS 8.3.0.1242 installed and both the DYMO_Label_v.8_SDK_Installer [ver. 8.2.0.0] and the DYMO_Label_v.8_SDK_Installer.8.2.3.123-BETA [ver. 8.2.3.1027] installed on my Win 7 PC. Is there something else around that might elucidate the complete workings of the new ver. 8.3.xx DLS interface for VBA in detail?
Thanks for your help & support!
Comment by Greg O'Drobinak — April 5, 2011 @ 6:51 am |
IDymoTapeAddIn is not supported in DLS8. To print on a tape printer you have to use DYMO Label Framework API. Unfortunately there is almost zero documentation and samples for the COM part of the API. You could kind of deduct it the usage from the TLB file and .NET documentation available in BETA SDK in [My Documents]\DYMO Label\SDK\DYMO Label Framework\doc\DYMOLabelFramework.chm. I know, it is very limited, and I apologize for inconvenience. As for VBA sample, you can find a Access 2010 sample database here.
Comment by Vladimir — April 5, 2011 @ 8:55 am |
Thanks very much, Vladimir! You essentially solved my issues. This new 8.x DLS interface is sweet!
I noticed that there is some skeletal info on the framework within the Object Browser in Access 2010. When can we expect to see more detailed documentation about how to invoke and work with the COM framework in VBA within Access? I can parrot the code (with some understanding) to get the job done, but it would be nice to be able to have a good understanding of exactly what is going on within the COM framework.
Thanks, again!
Comment by Greg O'Drobinak — April 12, 2011 @ 6:40 am |
Thanks.
As for the documentation, there is no time-frame for the Framework COM API documentation. .NET will be updated soon. COM interface mimics .NET one as close as possible, so for now the best way is to use .NET documentation and the object browser to have an idea that is available. Sorry for inconvenience. If you have specific questions, just ask here on the blog, we will add a simple ‘how-to’ post.
Comment by Vladimir — April 12, 2011 @ 7:10 am |
Can you post a complete workable VB ASP.Net sample, including the references to the DLLs that are needed in the project? I have tried referencing every DLL I could find and it still tells me that dymo.label doesn’t exist.
Comment by Cliff Schaffer — March 4, 2011 @ 3:43 pm |
Did you install DYMO Label v. 8.3?
Comment by Vladimir — March 5, 2011 @ 6:30 am |
When are you going to release the live version?
Comment by Sergey — October 15, 2010 @ 10:33 pm |
Mid December
Comment by Vladimir — October 16, 2010 @ 5:34 am |