Jan 052016
 

I hope everyone enjoyed their holidays!  We have had a number of issues reported, several of them were big enough that we decided to release an 8.5.3 patch version that fixes the issues that were found.

Issues Fixed:

  • Win: There were instances that caused Barcode corruption when the Barcode was rotated on a label
  • Mac: There were issues with with the Web Service refreshing the list of DYMO printers
  • Mac: Web Service method timeout is increased due to too many timeouts
  • JS: Fixed issues with Async calls
  • JS: Fixed Issue that isBroswerSupported return the wrong value
  • JS: Fix Issue with a Crash when running in IE8

Reference the following posts for additional set up information.  Keep in mind that the Web Service is built into this version of DYMO Label so the standalone install is no longer required.

Downloads:

Thanks for all the great feedback!  Let us know of any issues found, we’ll continue to give the best support we can.

Update: Fixed a typo that was referencing the wrong revision number for the Windows build

Dec 142015
 

We are proud to announce the release of DYMO Label software version 8.5.3 for Mac.

UPDATE: The newest version is available in the following post: DLS 8.5.3 Patch Release

This release includes:

  • Support for OS X El Capitan
  • Support for Microsoft Office 2016
  • DYMO Label Web Service is installed for use by the DYMO Label Framework.

You can now download: DYMO Label software 8.5.3
You can also download the JavaScript Library : DYMO Label Framework 2.0

The JavaScript library is the same as the one posted in the DLS Windows release so the information in the following posts apply to the Mac version of the SDK. Keep in mind that the Web Service is built into this version.

Thanks again for everyone’s patience.  We were not able to do a Beta on the Mac version but it contains all the feedback that we got from the Windows Beta.  If there are any issues, please either post on the blog or send an email to sdkreply at newellco dot com.  We’ll be monitoring both looking for issues and will try to respond to issues as quickly as possible.  Keep in mind the more information that you include in your post/email, the better we will be able to help you.

It should be noted that the JavaScript Samples that are in older posts on the blog have not been updated to incorporate the web service correctly.

 UPDATE

We’ve had some reports from our users that a reboot may be required for the DYMO Web Service to get properly configured.  We are looking into this further.  The way you know you are in a state that requires a reboot is as follows:

  1. Click on the DYMO icon in the upper right on the top menu bar
  2. Select Diagnose
  3. If a dialog pops up and it complains about no ssl assigned to the port, you should reboot.
  4. If you see a dialog that says “DYMO Label Web Service is running on port XXX”, then there could be a different issue.

 

 

Apr 302010
 

In the last blog, I started out with a simple label printing application using the DLS SDK. If you are planning on using the SDK, you’ll need to become familiar with two objects that will do the bulk of label printing work in your application. The first one the DymoAddin object, the other is the DymoLabels object. We will examine on the DymoAddin object in this post.

Background

The DymoAddin object got its name from the time when DYMO needed to create addins for 3rd party applications. Instead of re-writing all the label printing code in a separate library, then using the library to implement the 3rd party addins (like the DLS MS Office Addins, DLS ACT! Addin, DLS QuickBooks Addin), we simply added a COM interface to the DLS application so we can leverage the label printing functionality from the DLS application. The first interface exposed was called the IDymoAddin interface, and the object that implemented the interface was called the DymoAddin object.

There are many methods exposed in the IDymoAddin interface, however, only a part of it is really intended for the SDK. The methods that don’t fall in this group are there because we (i.e. DYMO) needed it to implement some functionality for the addins we write for other applications. Call it lack of planning or oversight, these methods and properties that are really meant for internal DYMO use are lumped together in the same IDymoAddin interface that is used for SDK applications. For the most part, you should avoid using these methods and properties in your application. But as you sit down to understand the DLS SDK and design your own application, you’ll likely find that these methods and properties are too specialized and are not needed for your SDK application.

But what are these functions and methods that you shouldn’t use? Instead of listing them here, I will instead focus on the methods that are meant to be used by SDK applications.

Main Functionality

In the last blog, I outlined the three main concepts used in the DLS SDK. The first is the concept of a label file. The main functionality of the DymoAddin object is to implement the IDymoAddin interface, which provides operations you can perform on a label file, including opening, saving, and printing a label file. Because printing is part of the functionality, the IDymoAddin interface also provides methods to list and select DYMO printers for use in your SDK application. I will explore these methods and their usage (in C#) below.

File Operations

The Open(), Save(), and SaveAs() methods combined to give you the ability to open and save labels on your computer’s local file system. The same operations can be used on network storage if the storage location is addressable using UNC (i.e. Universal Naming Convention).

The following example shows how to open a label file and then save it with a different file name:

 1 private void FileOperatoinsExample()
 2 {
 3     DymoAddInClass _dymoAddin = new DymoAddInClass();
 4 
 5     // open a label file using absolute path, relative path
 6     // or UNC (for network accessible locations)
 7     if (_dymoAddin.Open(@"..LabelsSample.label"))
 8     {
 9         _dymoAddin.SaveAs(@"..LabelsSampleCopy.label");
10     }
11 
12     if (_dymoAddin.Open(@"C:UsersckhsuLabelsSample.label"))
13     {
14         _dymoAddin.SaveAs(@"C:UsersckhsulabelsSampleCopy.label");
15     }
16 
17     if (_dymoAddin.Open(@"\File ServerSharedLabelsSample.label"))
18     {
19         _dymoAddin.SaveAs(@"\File ServerSharedLabelsSampleCopy.label");
20     }
21 }
22 

Web Applications

Sometimes the label file you need is located in the cloud and you need to access it using an URL. The OpenURL() method is created for this purpose.

Proxy Server and Proxy Bypass

The OpenURL() method is implemented using WinInet. This means that the user’s proxy settings in IE is used when calling the OpenURL(). But depending on your application, this might not be desirable. You can use the following methods and properties to control proxy settings used for the OpenURL() method. These settings are good for the lifetime of the DymoAddinObject, but are not persistent beyond that. So if you free and create another instance of the DymoAddinObject, you will need to setup the custom proxy settings again for the next OpenURL call.

  • ProxyBypass property – set to True to bypass all proxy servers. When this property is set to True, it overrides all other proxy settings.
  • SetupProxySettings() method – setup custom proxy settings.
  • ClearProxySettings() method – clear all proxy settings and revert back to using IE’s proxy settings.

The following example shows how to open a label file using an URL.

 1 private void URLFileOperatoinsExample()
 2 {
 3     DymoAddInClass _dymoAddin = new DymoAddInClass();
 4 
 5     // use custom proxy setup.
 6     // by default, the OpenURL() method uses the same proxy
 7     // settings as IE
 8     _dymoAddin.proxyBypass = false;
 9     _dymoAddin.SetupProxySettings("http", "dymo_proxy_server", 80, "*.internal.dymo.*", "", "");
10 
11     // open a label file using URL
12     if (_dymoAddin.OpenURL("http://www.mylabelprinter.com/labels/shipping.lwl"))
13     {
14         _dymoAddin.SaveAs(@"LabelsSampleCopy.label");
15     }
16 }
17 

Database Operations

If your application uses a database to store label files, you can use the OpenStream() and SaveStream() methods to open and save label files using memory buffers.

The following example shows how to open and save label files into memory buffers:

 1 private void OpenAndSaveStreamExample()
 2 {
 3     DymoAddInClass _dymoAddin = new DymoAddInClass();
 4 
 5     // this is the buffer that will hold an array of bytes
 6     object buf = null;
 7 
 8     if (_dymoAddin.Open(System.IO.Path.Combine(
 9                             System.IO.Directory.GetCurrentDirectory(),
10                             @"DatabaseLabel.label")))
11     {
12         // get an array of bytes from Save Stream
13         buf = _dymoAddin.SaveStream();
14 
15         // at this point, you can store buf as a blob
16         // in your database
17         byte[] blob = (byte[])buf;
18     }
19 
20     // to open a label file from a blob in your database
21     // first, read the blob into into an array of bytes
22     // then pass the array of bytes to OpenStream
23     System.IO.MemoryStream ms = new System.IO.MemoryStream();
24 
25     // the following line is psuedo code aimed to illustrate how one
26     // might read a blob into an array of bytes
27     !!!Database.Table("Labels Table").Field("Shipping Label").SaveToStream(ms);
28 
29     // at this point, you can read the bytes
30     _dymoAddin.OpenStream(ms.GetBuffer());
31 }
32 

Printer Related Operations

The DLS SDK (and therefore your SDK applications) can only be used with LabelWriter printers. Because of this, we added printer listing and selection methods to filter out printers that are not compatible with the DLS SDK so your application will not need extra code to deal with printer compatibility and selection issues.

The following example shows how to get a list of LabelWriter printers installed on the computer, and selects a printer named “My LabelWriter” to print a label file:

 1 private void SelectPrinterAndPrintLabelExample()
 2 {
 3     DymoAddInClass _dymoAddin = new DymoAddInClass();
 4 
 5     string[] printers = _dymoAddin.GetDymoPrinters().Split(new char[] { '|' });
 6     foreach (var printer in printers)
 7     {
 8         // find the printer we want to print to
 9         if (printer == "My LabelWriter")
10         {
11             // select it first
12             _dymoAddin.SelectPrinter(printer);
13 
14             // then print the currently open label
15             if (_dymoAddin.IsTwinTurboPrinter(printer))
16             {
17                 // print one copy of label to the left tray
18                 _dymoAddin.Print2(1, false, 0);
19             }
20             else
21             {
22                 // print one copy of label to the only tray
23                 _dymoAddin.Print(1, false);
24             }
25             break;
26         }
27     }
28 }
29 

A new method worth mentioning is the IsPrinterOnline() method, which return the online/offline status of a printer.

Conclusion

Although the DymoAddin object’s name may not invoke any ideas of the functionality it provides, it is an important part of the because of the rich features it provides. I hope this blogs gives you a good idea of the DymoAddin object’s capabilities and how to best use the capabilities for your specific application.