Aug 082016
 

Working with DYMO Label Web Service


Download Word Version of this post

Download PDF Version of this post

What is the DYMO Label Web Service?

 

In the past, developers had to provide a browser-specific plug-in for each major web browser.  Nowadays, most browsers have phased out native plug-in support.  Google, for example, stopped supporting Chrome their NPAPI browser extension in September 2015.  In response, we released the DYMO Web Service as a new cross-browser solution allowing third-party developer applications the ability to interface with the DLS SDK in a seamless, browser-agnostic fashion.  It handles all printer-related requests from the JavaScript Library that the DYMO Label Framework browser plug-ins used to perform.

(For more information on the framework, please visit http://developers.dymo.com/2015/08/20/dymo-label-framework-javascript-library-2-0-open-beta/.)

 

How do I install the DYMO Label Web Service?

 

First, download the appropriate installer for your OS.  You can find them at the following URL:

http://www.dymo.com/en-US/online-support/

 

Windows

Double-click on the installer and follow the directions provided by the install wizard.

Mac

Double-click on the DMG file to mount it.  Select the newly mounted volume and double-click on the PKG file found within it.  Then follow the directions provided by the install wizard.

How can I tell if I have DYMO Label Web Service installed?

 

The DYMO Label Web Service is installed as long as you have installed DYMO Label Software 8.5.3 or newer using the express “Express” mode.

If you choose to install DYMO Label Software in “Custom” mode, be sure to select the DYMO Label Web Service component as follows:

select_components_to_install

Custom select components to install

 

 

 

 

 

 

If installed, there will be an executable file named DYMO.DLS.Printing.Host.exe within the DLS working folder (normally found within the C:\Program Files (x86)\DYMO\DYMO Label Software folder on Windows and the /Library/Frameworks/DYMO/SDK folder on Mac).

 

 

Executable location (Windows)

Executable location (Windows)

 

How can I tell if the DYMO Label Web Service is running?

You should see the DLS application icon within the system tray.  Right-click this icon to display a context menu.  The menu displays the web service’s status (i.e., “Started on port 41951” or “Stopped”).

The following shows what it looks like on Windows.

DLS icon and context menu (Windows)

DLS icon and context menu (Windows)

 

On Mac, the DLS application icon and context menu will appear within the system tray like this:

DLS icon and context menu (Mac)

DLS icon and context menu (Mac)

I do not see it in the system tray.  How can I start it?

 

Windows

You can start the web service again by navigating to the DLS working folder and running the executable named DYMO.DLS.Printing.Host.exe.

Mac

Open a Finder window, navigate to the /Library/Frameworks/DYMO/SDK/ folder, and click on the DYMO.DLS.Printing.Host.app icon.

Open a terminal prompt and enter the following command:

launchctl start com.dymo.dls.webservice

 

How can I start or stop the DYMO Label Web Service?

You can start or stop the web service at any time by open right clicking on the service’s icon in the system tray and choosing the Start service and Stop service menu items, respectively.  Although API functions will not execute after stopping the service, the service icon will remain in the system tray after stopping it.

 

How can I configure the DYMO Label Web Service?

 

Clicking the Configure menu item will cause a configuration window to appear.  This allows you to change the language and listening port.  The web service will normally try to use the first available port within the 41951-41960 range.  You can override this behavior by checking the Use single port checkbox, which makes the service only try using the specified port only. You cannot specify a port number that does not fall within the specified range.  The service will not try using any other port if an error occurs while using this option.

Web Service configuration dialog (Windows)

Web Service configuration dialog (Windows)

 

 

Web Service configuration dialog (Mac)

Web Service configuration dialog (Mac)

 

 

How can I tell if the DYMO Label Web Service is functioning properly?

Click the Diagnose menu item within the context menu while the service is running.  If the self-test succeeds, a dialog box will appear asking you to open a test page in your browser to see if SSL certificate is working.

 

Diagnose successful (Windows)

Diagnose successful (Windows)

Diagnose successful (Mac)

Diagnose successful (Mac)

 

Click the Yes button to open your default web browser.  The browser should display a page indicating the web service is running correctly.  The page address should be something to the following effect:

https://localhost:41951/DYMO/DLS/Printing/Check

The port number may vary from machine to machine.

 

Web Service is up and running configuration

Web Service is up and running configuration


 

How do I use the DYMO Label JavaScript Library?

 

Getting Started

You need to link to the DYMO Label Framework’s JavaScript library in order to use the DYMO Label Web Service via web pages.  You accomplish this by using the following code snippet:

 <script src="dymo.label.framework.js" type="text/javascript" charset="UTF-8"></script>

Your code then needs to call the following initialization method while providing it a callback to be invoked by the library when initialization completes:

 dymo.label.framework.init(startupCode);

The library invokes this callback whether or not initialization completes successfully.

 

Do I need to change my code to work with the new DYMO Label JavaScript Library?

Although it may work with old unmodified code in some cases, it is highly recommended to make a few changes to avoid future problems.

The biggest change to the JavaScript Library is the move from a synchronous architecture to an asynchronous one.  This move has several advantages, improved UI responsiveness and shorter discovery time while scanning the available port range.  Synchronous AJAX calls are already marked deprecated in most major web browsers, so we recommend switching to asynchronous JavaScript Library initialization as soon as possible.

 

What will happen if I leave my old code unchanged?

If you do not update your code to make use of asynchronous calls, the JavaScript Library will fall back to the synchronous behavior upon accessing the library for the first time when a page is loaded.  It will synchronously try to scan the first port.  This is either the default port or the last known working one (i.e., the cached port number).  The library will use web service-based functionality if it successfully connects to the port.  Otherwise, it will fall back to using native plug-ins.  All subsequent calls to the library will continue to reuse whatever method succeeded until you reload the page.

 

What do I need to change in my code to make it properly work with new the JavaScript library?

 

The library now makes use of a new initialization method to perform asynchronous initialization through use of a callback method.  Since the library performs initialization in the background, calling an SDK function prior to initialization results in an error.  Your code should be updated to call the new dymo.label.framework.init() method while providing it a callback to be invoked by the library when initialization completes.  Please note the library invokes this callback whether or not initialization completes successfully.

Any code initialization involving calls to the JavaScript Library is typically located inside an event handler (i.e., window.onload).  Below is typical JavaScript code demonstrating how to do this with the old synchronous architecture:

function startupCode() {
/* access DLS SDK */
}

window.onload = startupCode;

This code will not work correctly under the new asynchronous architecture.  It should be changed to call an intermediate “helper” method that firsts calls new init() method accepting your callback as a parameter.  The library invokes the callback containing your original startup code after library initialization completes.  Below is the updated JavaScript code that uses asynchronous initialization:

function startupCode() {
/* access DLS SDK */
}
function frameworkInitHelper() {
// init, then invoke a callback

dymo.label.framework.init(startupCode);
}

window.onload = frameworkInitHelper;

If initialization is asynchronous, are other methods asynchronous as well?

The short answer is, “Yes!”  As stated previously, synchronous AJAX requests are deprecated, so our new JavaScript library contains new asynchronous equivalents for every method that calls the web service.  These methods have the same names as their counterparts in the former architecture along with the Async suffix appended to them.  They take the same number of parameters with corresponding types as well.  The only major difference is that the new methods return a Promise object instead of the actual return value.  You make use of this object by providing its then() method your callback function and one argument which receives the actual return value when the asynchronous method completes.

 dymo.label.framework.getPrintersAsync().then(function(printers) {
// printers list (same list the getPrinters() returns)
});

 

How do I make use of Promise objects in asynchronous programming?

Asynchronous JavaScript programming is not covered here. Please refer Google’s documentation on Promise object usage and errors handling:
https://developers.google.com/api-client-library/javascript/features/promises

How can I tell if the JavaScript library is currently using the web service?

The dymo.label.framework.checkEnvironment() method returns a CheckEnvironmentResult object along with multiple parameters (please refer to existing documentation on checkEnvironment() method).  The new JavaScript library contains an additional property within this object called isWebServicePresent.  You can use this property to determine if the web service is actually used.

As with all other SDK-related methods, do not call checkEnvironment() until init() finishes initializing. Synchronous library initialization and web service discovery will occur if it is called before init() completes.

Basic Service API Functions

 

The following is a list of basic API functions provided by the DYMO Label JavaScript Library.

dymo.label.framework.getPrinters()

Purpose:  Returns a list of installed DYMO printers
Parameters:  None.
Example:

printers = dymo.label.framework.getPrinters();
for(var i = 0; i < printers.length; i++)
{
var printer = printers[i];
console.log(printer);
}

dymo.label.framework.openLabelFile(labelUri)

Purpose:  Returns a document object model (DOM) for label file.
Parameters: 

labelUri – label file Uri

Example:

 var labelUri = "file:///Volumes/DATA/DieCut.label";
var label = dymo.label.framework.openLabelFile(labelUri);
console.log(label.toString());

Comments:

It is necessary to use the label.getLabelXml() or label.toString() functions to obtain XML representations of a label.

 

dymo.label.framework.renderLabel(labelXml, paramXml, printerName)

 

Purpose:  Returns a graphic representation of the label (PNG) encoded in base64 format.
Parameters: 

labelXml – DOM or XML representation of the label

paramXml – render parameters

printerName – printer name

Example:

 var image = document.createElement('img');
var labelXml = dymo.label.framework.openLabelFile(labelUri).getLabelXml();
var pngData = dymo.label.framework.renderLabel(labelXml, "", printerName);
image.src = "data:image/png;base64," + pngData;

dymo.label.framework.printLabel(printerName, paramXml, labelXml, labelSetXml)

 

Purpose:  Prints a label on the specified printer.
Parameters:

printerName – printer name

paramXml – printing parameters

labelXml – DOM or XML representation of the label

labelSetXml – data set for label objects

Example:

 var paramsXml = dymo.label.framework. createLabelWriterPrintParamsXml ({ copies: 2 });
var labelSetXml = new dymo.label.framework.LabelSetBuilder();
var record = labelSet.addRecord();
record.setText("Address", "Test Address String");
dymo.label.framework.printLabel(printerName, paramsXml, labelXml, labelSetXml);

 

TROUBLESHOOTING

 

What is Trace functionality?

Our JavaScript Library now includes trace functionality that may help you debug your code.  You can enable it by adding the following code vline before calling the init() method:

dymo.label.framework.trace = 1;
dymo.label.framework.init(callback);

When using this code, you will see which steps the library takes every time it attempts to initialize (i.e., synchronous vs asynchronous initialization, port number if web service is discovered, fallback implementation selection, etc.).

Below is sample trace output when init() is called and the web service is present:

checkEnvironment > cachedWebPort : 41951
checkEnvironment > trying async service discovery
_createFramework > return _framework : undefined (async)
onEnvironmentChecked > checkResult isBrowserSupported : true, isFrameworkInstalled: true, isWebServicePresent: true
chooseEnvironment > WebServicePresent

The following is an example for case when init() is not called but the web service is running (fallback mode for legacy user code):

checkEnvironment > cachedWebPort : 41951
checkEnvironment > trying sync service discovery
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience.
checkEnvironment > web service found at port :41951
onEnvironmentChecked > checkResult isBrowserSupported : true, isFrameworkInstalled: true, isWebServicePresent: true
chooseEnvironment > WebServicePresent

This sample output demonstrates the case when the web service is not running (fallback mode for legacy plug-ins).  Here the init() method was called; not calling the init() method will eventually lead to same fallback behavior but will additionally result in a hung UI during the initialization phase):

checkEnvironment > cachedWebPort : undefined
checkEnvironment > trying async service discovery
_createFramework > return _framework : undefined (async)
checkLegacyPlugins > WIN platform
checkLegacyPlugins > non-IE
checkLegacyPlugins > ‘application/x-dymolabel’
onEnvironmentChecked > checkResult isBrowserSupported : true, isFrameworkInstalled: true, isWebServicePresent: false
chooseEnvironment > WIN

 

How do I perform error logging?

Improper DYMO Label SDK usage or multiple unexpected external factors may result in errors.  You may need to retrieve logging data in these cases to help resolve problems.

Network and web service errors

To see communication errors and service fault messages, you will need to open Developer Tools (invoked by F12 key in most browsers) and open “Network” tab. If you see erroneous response in the list, you can click it and look for details in adjacent window (look and position is browser-specific). Response body would normally contain error description.

Web service log

The log file is located at %LocalAppData%\DYMO\DLS8\DLSWebService.log

If you are performing some specific tests, we recommend you delete the existing log before making a test run to eliminate any unnecessary log messages.

  150 Responses to “DYMO Label Web Service FAQ”

  1. Hello,
    do you have any working example how to read the weigh for Dymo scales?

    Regards,
    Alex

  2. Hi,

    Do you have an example page showing DYMO Label JavaScript Library interacting with DYMO Label Web Service to print simple label?

  3. I really like the debugging functionality documented here with the trace() method and the error log. I hadn’t seen that documented elsewhere, so it is good to see it documented here. Thanks for all you do to help developers!

  4. Still no info about to change localhost address. :(

  5. Chrome 52 on SOME client machines are unable to connect to the dymo web service. Error provided by Chrome is “ERR_SSL_FALLBACK_BEYOND_MINIMUM VERSION”. Using Dymo 8.5.3

    What baffles me is if all clients are using the same exact versions of all software (the website, chrome, windows, and dymo client) why would it work only on some machines and not others?

  6. Where exactly do I get the correct dymo.label.framework.js?
    The one in the sdk download is from 2011 and does not have the init method.

  7. Could we please get an update to the documentation ( http://labelwriter.com/software/dls/sdk/docs/DYMOLabelFrameworkJavaScriptHelp/symbols/dymo.label.framework.html) It would be nice to see the available functions there!

    Thanks,

    Robert

  8. Is there an async alternative to `dymo.label.framework.checkEnvironment` ?

    • Hi Robert,

      I will look into this for you and get back to you as soon as I can!

      Regards,
      Jeff

    • I’m pretty sure all of our JavaScript framework methods have async counterparts.

      • I tried to find it by inspecting the dymo framework object, and nothing jumped out:


        JSON.stringify(Object.keys(dymo.label.framework).sort(), undefined, 2)
        "[
        "AddressBarcodePosition",
        "FlowDirection",
        "LabelSetBuilder",
        "LabelWriterPrintQuality",
        "PrintJobStatus",
        "TapeAlignment",
        "TapeCutMode",
        "TwinTurboRoll",
        "VERSION",
        "addPrinterUri",
        "checkEnvironment",
        "createDZPrintParamsXml",
        "createLabelRenderParamsXml",
        "createLabelWriterPrintParamsXml",
        "createTapePrintParamsXml",
        "getDZPrinters",
        "getDZPrintersAsync",
        "getLabelWriterPrinters",
        "getLabelWriterPrintersAsync",
        "getPrinters",
        "getPrintersAsync",
        "getTapePrinters",
        "getTapePrintersAsync",
        "init",
        "loadImageAsPngBase64",
        "loadImageAsPngBase64Async",
        "openLabelFile",
        "openLabelFileAsync",
        "openLabelXml",
        "printLabel",
        "printLabel2",
        "printLabel2Async",
        "printLabelAndPollStatus",
        "printLabelAndPollStatusAsync",
        "printLabelAsync",
        "removeAllPrinterUri",
        "removePrinterUri",
        "renderLabel",
        "renderLabelAsync",
        "trace"
        ]"

        There are some interesting functions there though, it would be nice to learn about “printLabelAndPollStatus”!

        • I am assuming that this is a complete list of methods on the most recent JS framework post Async?

          And that none of these have been changed or modified in the more recent versions of the SDK?

          This is the only place on the website so far that I have found a documented list of methods Async or otherwise…

  9. I’m trying to test the web service on my Mac with this webpage http://labelwriter.com/software/dls/sdk/samples/js/PrintMeThatLabel/pl.html
    but when I type https://localhost:41951 into the printer location (url) it simply tells me it cannot connect.
    There are no examples of what to type for Macs. I presume this is the format because that’s the beginning of the url when I run the diagnose (it tells me the service is working correctly)
    Am I missing something or is the service not working?
    Thanks!
    Leah

  10. What exactly does the isBrowserSupported value mean these days? I’m seeing cases where we get a true value for someone using IE 11 in Windows 8.1 that has the Dymo Web Service software installed, yet the value for isWebServicePresent comes back as false and isFrameWorkInstalled comes back as true. In this particular case, they are able to print, but we would like to use these values to provide useful information. Any help is appreciated!

  11. The javascript files in “DYMO Label v.8 SDK” (which is linked on the main site) seem to be from an old version.

    All the samples do not work on chrome. “dymo.label.framework.js” is the 2011 verrsion.

    Where do you download the 2016 version of “dymo.label.framework.js” and code samples? They are not included in this article post.

  12. Could it be that the javscript library is not compatible with some later versions of SystemJS? Im trying to use it with Aurelia.io. But when I include the script tag in my main html file an error occurs:

    Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.

    When I try SystemJS.import an other error appears about an iterator in the framework library

    Thanks for any suggestions,

    • Hi Kris,

      We don’t have any experience with Aerelia.io and SystemJS, but my first off-the-cuff suggestion would be to try naming all of your System.register calls.

      Regards,
      Jeff

  13. We tried updating to the async functions this weekend, but we had to roll back because some customers were having “dropped labels”. We would request them from JavaScript, but they wouldn’t make it to the printer.

    We can replicate the issue locally, and it gives this error:

    “Uncaught Error: Failed to execute webservice command: GetPrinters. Error: -1”

    Here’s a screenshot, with the trace output:

    https://cloud.githubusercontent.com/assets/2231765/18676904/3845d3e0-7f25-11e6-8998-48021550eefa.png

    The request fails after 3.0s, which seems like a timeout.

    I guess we’ll implement some client-side throttling. I can’t think of any other way to work around this, can you?

    Also, is there any way that we could learn about this behavior of the webservice, or any way to find the meaning of the “-1” error message? I’d be happy to read some documentation, but I haven’t found it yet!

    Thanks

    Robert

  14. dymo.label.framework.openLabelFileAsync doesn’t seem to work correctly.
    I have tried a variety of methods and I can only get the synchronous version to work.

    Anyone have any success?…any snippet would be much appreciated!

    It seems there isn’t much time!!! – Invoking ‘send()’ on a sync XHR during microtask execution is deprecated and will be removed in M54, around October 2016. See https://www.chromestatus.com/features/5647113010544640 for more details.

    • Hi Andrew,

      Can you post examples of what you have already tried that do not work?

      Thanks,
      Jeff


      • function startupCode() {

        //dymo.label.framework.openLabelFileAsync("/path/to/label.label").then(function(label){
        //var labelXml = label.toString();
        //console.log(labelXml);

        //});

        var labelXml = dymo.label.framework.openLabelFile("/path/to/label.label");
        var labelXml = labelXml.toString();

        var printerName = "DYMO LabelWriter 450";
        var paramsXml = dymo.label.framework.createLabelWriterPrintParamsXml({ copies: 3 });
        var labelSetXml = new dymo.label.framework.LabelSetBuilder();
        var record = labelSetXml.addRecord();
        record.setText("BARCODE", 334433);
        record.setText("PRICE", "$123.44");

        dymo.label.framework.printLabelAsync(printerName, paramsXml, labelXml, labelSetXml);

        //console.log(printerName);
        //console.log(paramsXml);
        //console.log(labelXml);
        //console.log(labelSetXml);

        }

        function frameworkInitShim() {
        dymo.label.framework.trace = 1; //true
        dymo.label.framework.init(startupCode); //init, then invoke a callback
        }

        window.onload = frameworkInitShim;

  15. Hi,

    is there any possibility to send the request via POST with curl e.g.
    We want to print labels within the javascript libraray.

    In which format do we have to send the request to the Web Service Proxy ?
    JSON? x-www-form-urlencoded RAW ?

    If we send the request weŕe getting error in Logfile, that the XML could not be parsed (+)

    Thanks

    • Hi Leo,

      What URL are you trying to use? What data are you trying to send via POST?

      Although I have used cURL in the past, I never tried it with JavaScript as you are trying to do. Take a look here and see if it helps.

      I took a look at the options provided on that SO and it seems like this one might do it for you:

      http://phantomjs.org/

      Thanks,
      Jeff

  16. Hi,
    I’m using this code in my aspx page to print a label from a browser:

    var label = DYMO.Label.Framework.Label.Open(“NameLabele.label”);
    label.SetObjectText(“NameTxt”, “John Smith”);
    label.SetObjectText(“CompanyTxt”, “Newell Rubbermaid”);
    label.Print(“DYMO LabelWriter 400″);

    It prints,but not at same place as when I do it through DLS although I use the same xml label model.
    How can I change the top margin of the printing programatically ?
    Thanks

  17. Hello Everyone,
    I was wondering is there is a way of integrating the javascript library to an existing web application which is being hosted on a linux server.
    Going trough most recent post I havent seen a way of specifying the host address where the web service is running which is a windows machine.
    Thanks in advanced for your help.

  18. I can’t get DLS installed on Max OS X El Capitan. On Windows I need to select express install. How do I do that on a Mac?

  19. I’m trying to print a ContinuousLabel on a 450 Turbo. I found the example here for continuos labesl.
    The constructor takes:
    labelId
    Type: System.String
    The unique label ID. All label IDs are defined in Labels.xml.

    2 Questions
    Is it possible to print a continuous label on a 450
    I can’t find Labels.xml anywhere. What would be the labelId for the 2 1/4 (30270) paper

    • Hi Brian,

      I, personally, am not too familiar with that SKU. But I opened up DLS and tried creating a label using it and it seems to work.

      The best way to figure out how labels work is to run DLS and create a label there. Open up the label file and see what’s in it. Then you can import it into your project. Labels.xml is not a publicly available file, so inspecting label files you create with DLS is your best bet.

      Regards,
      Jeff

  20. Since switching to Async functions (except for checkEnvironment, for which I could not find an async function), some of our users are reporting an error:

    PrintLabel: Error: -1

    Is there any way for me to learn what this error means?

    I checked the JS documentation (http://labelwriter.com/software/dls/sdk/docs/DYMOLabelFrameworkJavaScriptHelp/symbols/dymo.label.framework.html) but I couldn’t find any references to error codes!

    Thanks,

    Robert

  21. Updating my code to use v2 of the Framework and have it working cross browser however I’m experiencing an issue with Edge.

    The code works on the development machine (localhost) in Edge but when in production, live on the web, it is returning the following…

    checkEnvironment > cachedWebPort : undefined
    DYMO.Label.Framework.2.0.2.js (106,15)
    checkEnvironment > trying async service discovery
    DYMO.Label.Framework.2.0.2.js (106,15)
    _createFramework > return _framework : undefined (async)
    DYMO.Label.Framework.2.0.2.js (106,15)
    checkLegacyPlugins
    DYMO.Label.Framework.2.0.2.js (106,15)
    checkLegacyPlugins > WIN platform
    DYMO.Label.Framework.2.0.2.js (106,15)
    checkLegacyPlugins > non-IE
    DYMO.Label.Framework.2.0.2.js (106,15)
    onEnvironmentChecked > checkResult isBrowserSupported : true, isFrameworkInstalled: false, isWebServicePresent: false, errorDetails: DYMO Label Framework Plugin is not installed
    DYMO.Label.Framework.2.0.2.js (106,15)
    onEnvironmentChecked > exception e : DYMO Label Framework Plugin is not installed
    DYMO.Label.Framework.2.0.2.js (106,15)
    onEnvironmentChecked > fall back to createFaultyFramework
    DYMO.Label.Framework.2.0.2.js (106,15)
    _createFramework > returning existing instance of _framework, has callBack: false
    DYMO.Label.Framework.2.0.2.js (106,15)
    _createFramework > returning existing instance of _framework, has callBack: false
    DYMO.Label.Framework.2.0.2.js (106,15)

    Any ideas as to why Edge isn’t finding the framework when all other browsers are?

    Thanks

    Mike

  22. I am having an issue in Windows where labels with images generate an error when calling the frameworks “render” method. The error I’m getting is “[0] The calling thread must be STA, because many UI components require this. ”

    This issue does not occur on MacOS – the label renders correctly.

    Is this a known issue? How may I resolve this issue?

    • As a follow up to this, it appears this issue may have been introduced with DLS v 8.6. After uninstalling 8.6 and installing 8.5.4, the issue is rectified.

    • It appears v 8.6 also completely removes the Dymo browser plugin for Firefox and Internet Explorer (in Windows). I tried uninstalling and then reinstall but still no browser plugin. Then I uninstalled v8.6 and installed v 8.5.3 which we had been using and voila! Dymo plugin is back and working just fine in both Firefox 45 ESR and Internet Explorer 11 (both in 32-bit mode) on Windows 7. Unfortunately we need this functionality for a web-based POS and inventory system (ShopKeep BackOffice) that supports only Dymo devices.

      • Hi Barry,

        We have moved away for specific browser plug-ins due to various issues with the browsers. We now provide a Web Service which should work with all browsers. Learn about it here:
        http://developers.dymo.com/2016/08/08/dymo-label-web-service-faq/

        • dymo dev – I am utilizing the web service in my application but getting the error mentioned above with upgrade to 8.6. Do you have any information?

          • I’m also having the same issue like Bryan since installing the latest version v8.6. All RenderLabel requests fail with 400 Bad Request and the following response:

            "[0] The calling thread must be STA, because many UI components require this. "

            Seems like there is an internal error in the DYMO Webservice, this is what I see in the log file:

            YMO.DLS.Printing.Host.exe Error: 0 : WebMethod call failed: The calling thread must be STA, because many UI components require this.
            at System.Windows.Input.InputManager..ctor()
            at System.Windows.Input.InputManager.GetCurrentInputManagerImpl()
            at System.Windows.Input.KeyboardNavigation..ctor()
            at System.Windows.FrameworkElement.FrameworkServices..ctor()
            at System.Windows.FrameworkElement.EnsureFrameworkServices()
            at System.Windows.FrameworkElement..ctor()
            at DYMO.DLS.Runtime.ImageObject.RenderImage(BitmapSource source, DrawingContext dc, Rect imageRect, Boolean isPrinting)
            at DYMO.DLS.Runtime.ImageObject.RenderImageWithBorder(DrawingContext dc, BitmapSource image, Rect imageRect, Rect bounds, Boolean isPrinting)
            at DYMO.DLS.Runtime.ImageObject.RenderOnePart(RenderParams renderParams)
            at DYMO.DLS.Runtime.LabelObject.RenderMirrowed(RenderParams renderParams)
            at DYMO.DLS.Runtime.LabelObject.RenderRotated(RenderParams renderParams)
            at DYMO.DLS.Runtime.LabelObject.Render(RenderParams renderParams)
            at DYMO.DLS.Runtime.DieCutLabel.RenderLabel(LabelRenderParams renderParams)
            at DYMO.DLS.Runtime.Label.Render(LabelRenderParams renderParams)
            at DYMO.DLS.Runtime.DieCutLabel.Render(LabelRenderParams renderParams)
            at DYMO.DLS.Runtime.Label.DrawObjects(LabelRenderParams renderParams)
            at DYMO.Label.Framework.Label.RenderAsPng(IPrinter printer, ILabelRenderParams renderParams)
            at DYMO.Label.Framework.Framework.RenderLabel(String labelXml, String renderParamsXml, String printerName)
            at DYMO.DLS.Printing.Host.DlsWindowsFramework.RenderLabel(String labelXml, String renderParamsXml, String printerName)
            at DYMO.DLS.Printing.Service.DymoPrintingService.c__DisplayClassc.b__b()
            at DYMO.DLS.Printing.Service.WebUtils.ExecuteWrapped[T](Func`1 f)

          • We are aware if this issue and are actively working on a fix. Stay tuned… For the time being, you can remove Image objects from your labels if possible as these are the root of the problem. Labels without images should work just fine.

          • We’re also having increased reports of failures! I guess we’ll tell our customers to reinstall the old version.

            Feature request: If we could detect the DLS version in JavaScript, we could selectively notify people in the UI that they should get a different version. Additionally, we could add the DLS version to our bug reports so we could keep an eye on usage. Could you add that sometime?

          • Our new DLS release should fix this.

            Please download the new DLS release here:

            http://developers.dymo.com/?p=1356

    • Please see the new DLS release here:

      http://developers.dymo.com/?p=1356

  23. I’m running into an issue where calling the openLabelFile from the Dymo.Label.Framework.js framework causes Mac-specific problems. To be more specific, openLabelFile(“myURL”) is supposed to execute a GET call to my server which works fine on Windows. On Mac however, the call’s parameters are stripped for some reason, resulting in my server not getting the proper label names and whatnot. I’ve tested this on Firefox, Chrome and Safari and they all exhibit this issue.

    I know the parameters are getting added to the request as I’m printing out the URL right before I hand it off to ‘openLabelFile()’. Something is going wrong inside that method but I can’t debug it very well as it’s inside your minified framework. I’ve tested this on both versions 8.5.3 and 8.6 of your DLS software and it’s occurring on both. I’m using the latest version of the Dymo.Label.Framework.js framework as well (2.0.2).

    I’d very much appreciate some help with this.

  24. Hello,
    I am trying to figure out how to use the getPrintersAsync function.
    I’ve checked your new examples, but they are all using the old functions.
    Is it possible to update your examples to the Async functions or to give me any examples how to get it work?

    Best regards,
    Bart

    • I agree with this. All of the examples are sync and we need async for some of the less experienced coders out there that are unable to compare the Google’s promises conversion and relate it to the code on the website here which are structured completely differently.

  25. ##Render label gives error

    I try to render label PNGs (as from your example) from 3 labels.
    The first two are working fine, but on the third label I get the following error:

    Uncaught Error: Failed to execute webservice command: RenderLabel. Error: -1(…);

    I’ve tried different label-files. I even tried to render the first one, for a second time.
    Whatever I try the error occurs.
    It seems like the script is only able to render two previews.

    Can you help me?

    Best regards,
    Bart

    • Hi Bart,

      What script are you referring to? Is this one of our samples or something you wrote? What version of our software are you using?

      Thanks,
      Jeff

  26. Is it just me or is there no option to not install the web service with the latest Dymo Software 8.6?

  27. Hello

    I wold like to remove DYMO LABEL WEB service from my mac , but I don’t see the icon or program on finder ?

    Best regard
    Marco

  28. Are you able to provide more of a defined timeframe for when you expect the update to 8.6 to be released?

  29. Are goal is to have a release by the end of this month.

  30. Hi DymoJeff —

    Any chance of a Linux version of the Dymo Proxy?

  31. Hi There, I can see my my setup is up and running when I check https://myserverip:41951/DYMO/DLS/Printing/Check when I sit behind my server and use my server browser. However I get no response when I use above link on any of my tablets/computers within my local network.
    What could be the problem?
    We need our staff to be able to print labels on their tablet’s browser

    Regards,
    Sean

  32. Could someone please help me on previous question?

  33. I have an increasing number of customers using various versions of Windows who are experiencing issues with DLS noted above in my previous posts. Can you please provide an update on timeline for the proposed fix, as well as some information about what is being fixed?

    Thank you in advance!

    • Ping! Please provide an update on the status of the issues with 8.6 and if/when an update will be ready to address them.

  34. I’m not a developer — and this annoying menu item just showed up when I upgraded to the latest Dymo.

    Where are the instructions to get this unwanted junk off my Mac? Very bad usability.

  35. Sorry but the documentation is incorrect. The web service isn’t optional. You can’t even select it.
    Please provide an option to install the web service

  36. The number of customers who are affected by the inability to build labels with images is increasing. Can you please provide some sort of update on your progress to identify and resolve this issue?

    • Can you please post details regarding the problem you are having?

      • Please see comment #22 above and associated thread, originally posted on 11/30/16, for full context.

        General issue is that all RenderLabel requests fail with 400 Bad Request and the following response: “[0] The calling thread must be STA, because many UI components require this. “

  37. Web service not being discovered running MS Edge browser on Windows 10. It works fine in Chrome and Firefox. checkEnvironment() returns isBrowserSupported : true, isFrameworkInstalled: false, isWebServicePresent: false,

    checkEnvironment > cachedWebPort : undefined
    DYMO.Label.Framework.2.0.2.js (107,19)
    checkEnvironment > trying async service discovery
    DYMO.Label.Framework.2.0.2.js (107,19)
    _createFramework > return _framework : undefined (async)
    DYMO.Label.Framework.2.0.2.js (107,19)
    checkLegacyPlugins
    DYMO.Label.Framework.2.0.2.js (107,19)
    checkLegacyPlugins > WIN platform
    DYMO.Label.Framework.2.0.2.js (107,19)
    checkLegacyPlugins > non-IE
    DYMO.Label.Framework.2.0.2.js (107,19)
    onEnvironmentChecked > checkResult isBrowserSupported : true, isFrameworkInstalled: false, isWebServicePresent: false, errorDetails: DYMO Label Framework Plugin is not installed
    DYMO.Label.Framework.2.0.2.js (107,19)
    onEnvironmentChecked > exception e : DYMO Label Framework Plugin is not installed
    DYMO.Label.Framework.2.0.2.js (107,19)
    onEnvironmentChecked > fall back to createFaultyFramework
    DYMO.Label.Framework.2.0.2.js (107,19)

    However, the print and preview sample on Dymo site DOES work

    • We have the same problem with Edge browser.
      All works fine in IE, Chrome and Firefox.

      onEnvironmentChecked > checkResult isBrowserSupported : true, isFrameworkInstalled: false, isWebServicePresent: false, errorDetails: DYMO Label Framework Plugin is not installed

      Any help would be apreciated!

  38. Hello,

    I am using DYMO Label Framework Plugin in my website to print label.
    I have added js “http://labelwriter.com/software/dls/sdk/js/DYMO.Label.Framework.latest.js” in my web page.
    When I click “Print” button, an alert says “DYMO Label Framework Plugin is not installed”.

    Please help me in resolving this issue.

    Thank you in advance.

    • What OS are you using? Can you let me know what you have installed so far? Please provide a screenshot as well.

    • I ran into a similar issue, the certificate being used by the Dymo webservice was not recognized as being valid.

      Try opening up https://localhost:41951/DYMO/DLS/Printing/StatusConnected from your browser. This page should display ‘true’ if everything is working, If not, the connection is being blocked due to the SSL certificate. To fix:
      In Firefox, click Advanced, then “Add Exception”, “Confirm Security Exception”.
      In Chrome, click Advanced, then click the option to proceed.

  39. Is there a place where I can get a unminified version of the JavaScript DymoLabel Framwork or documentation about all methods?

    I really like the framework but think it lacks good documentation.

  40. How is everything going with the update to fix the RenderLabel request issue?

  41. Hello DymoJeff.

    I was wondering if you, or someone could help with this issue:

    Portrait
    DT Cryo-Tags 9138-1000 1.05″ x 0.50″

    TEXT

    Rotation90
    False
    False
    Center
    Middle
    ShrinkToFit
    True
    False

    9138-1000

    Please see the tag. It causes it to break (400 Bad Request). This however, used to work 100% just fine with the NPAPI plugin, and it works if you right click > load in the Dymo Label software.

    Here is the error:

    DYMO.DLS.Printing.Host.exe Information: 0 : Starting DYMO.DLS.Printing.Host 8.6.1.42858
    DateTime=2017-03-13T17:32:52.5800692Z
    DYMO.DLS.Printing.Host.exe Information: 0 : Loading printing lib from C:\Program Files (x86)\DYMO\DYMO Label Software\PrintingSupportLibrary.dll
    DateTime=2017-03-13T17:32:52.6310876Z
    DYMO.DLS.Printing.Host.exe Information: 0 : StartHost: https://localhost:41951/DYMO/DLS/Printing
    DateTime=2017-03-13T17:32:52.7646729Z
    DYMO.DLS.Printing.Host.exe Information: 0 : CheckServiceStatus
    DateTime=2017-03-13T17:33:07.6308673Z
    DYMO.DLS.Printing.Host.exe Information: 0 : GetPrinters
    DateTime=2017-03-13T17:33:07.6408750Z
    DYMO.DLS.Printing.Host.exe Information: 0 : GetPrinters
    DateTime=2017-03-13T17:33:07.6612374Z
    DYMO.DLS.Printing.Host.exe Information: 0 : PrintLabel: DYMO LabelWriter 450
    DateTime=2017-03-13T17:33:07.6892571Z
    DYMO.DLS.Printing.Host.exe Information: 0 : Utils.CreateLabelPrintParams(): printParams == null, creating default printParams based on printer type
    DateTime=2017-03-13T17:33:07.8691296Z
    DYMO.DLS.Printing.Host.exe Warning: 0 : LabelPrintLoop.Print(): Exception Type: NullReferenceException
    Object reference not set to an instance of an object.

    Stack Trace: at DYMO.DLS.Runtime.LabelPrintLoop.GetLabelOffsets(Label label)
    at DYMO.DLS.Runtime.LabelPrintLoop.PrintPage(PrintQueue printQueue, SerializerWriterCollator visualsCollator, ITextRecord textRecord)
    at DYMO.DLS.Runtime.LabelPrintLoop.Print()

    DateTime=2017-03-13T17:33:08.6067970Z
    DYMO.DLS.Printing.Host.exe Warning: 0 : LabelPrintLoop.Print(): visualsCollator.EndBatchWrite() failed: Exception Type: XpsWriterException
    Must call Write before calling EndBatchWrite.

    Stack Trace: at System.Windows.Xps.XpsWriterException.ThrowException(String message)
    at System.Windows.Xps.VisualsToXpsDocument.EndBatchWrite()
    at DYMO.DLS.Runtime.LabelPrintLoop.Print()

    DateTime=2017-03-13T17:33:08.6138016Z
    DYMO.DLS.Printing.Host.exe Information: 0 : Loading native printing lib from C:\Program Files (x86)\DYMO\DYMO Label Software\DYMOPrinting.dll
    DateTime=2017-03-13T17:33:08.6208069Z
    DYMO.DLS.Printing.Host.exe Error: 0 : WebMethod call failed: Printing Error: Object reference not set to an instance of an object.
    at DYMO.DLS.Runtime.Label.Print(Printer printer, LabelPrintParams printParams, Boolean endPrintJob)
    at DYMO.Label.Framework.Label.Print(IPrinter printer, IPrintParams printParams, IEnumerable`1 textSet)
    at DYMO.Label.Framework.Label.Print(IPrinter printer, IPrintParams printParams, String labelSetXml)
    at DYMO.Label.Framework.Framework.Print(String printerName, String printParamsXml, String labelXml, String labelSetXml)
    at DYMO.DLS.Printing.Host.DlsWindowsFramework.PrintLabel(String printerName, String printParamsXml, String labelXml, String labelSetXml)
    at DYMO.DLS.Printing.Service.DymoPrintingService.c__DisplayClass6.b__5()
    at DYMO.DLS.Printing.Service.WebUtils.ExecuteWrapped[T](Func`1 f)
    DateTime=2017-03-13T17:33:08.6901285Z

    ___________________________

    For some reason, if you replace blah blah with a prefab label like 30252 Address it works and doesn’t complain.

    __________________________

    This is a major issue and any help is appreciated.

    • What version are you using? Have you tried doing a clean install of our latest release that just came out?

  42. Hello DymoJeff.

    I was wondering if you, or someone could help with this issue:

    Since, the label has htmltag formatting, pastebin link for the label I’m trying to print is HERE any [ Tagname ] should just be read as proper XML. This form is cutting/trimming anything that resembles HTML.

    http://pastebin.com/19KjcAyr <— THE LABEL FILE

    NOTE: This label file LOADS and prints using the Dymo Label software (any version)
    BUT, when trying to use the web API it does _NOT_ work.

    For some reason, if you replace in the label file itself – [ CustomPaper ]blah blah [ /CustomPaper ] with a prefab label size like [ PaperName ] 30252 Address [ /PaperName ] it works and doesn’t complain. The error code is 400 BAD REQUEST and the actual log of the error is written below. I am unable to figure out how to proceed here, as standard label sizes are not helpful.

    ____________________
    Here is the error from the %appdata%.log:

    DYMO.DLS.Printing.Host.exe Information: 0 : Starting DYMO.DLS.Printing.Host 8.6.1.42858
    DateTime=2017-03-13T17:32:52.5800692Z
    DYMO.DLS.Printing.Host.exe Information: 0 : Loading printing lib from C:\Program Files (x86)\DYMO\DYMO Label Software\PrintingSupportLibrary.dll
    DateTime=2017-03-13T17:32:52.6310876Z
    DYMO.DLS.Printing.Host.exe Information: 0 : StartHost: https://localhost:41951/DYMO/DLS/Printing
    DateTime=2017-03-13T17:32:52.7646729Z
    DYMO.DLS.Printing.Host.exe Information: 0 : CheckServiceStatus
    DateTime=2017-03-13T17:33:07.6308673Z
    DYMO.DLS.Printing.Host.exe Information: 0 : GetPrinters
    DateTime=2017-03-13T17:33:07.6408750Z
    DYMO.DLS.Printing.Host.exe Information: 0 : GetPrinters
    DateTime=2017-03-13T17:33:07.6612374Z
    DYMO.DLS.Printing.Host.exe Information: 0 : PrintLabel: DYMO LabelWriter 450
    DateTime=2017-03-13T17:33:07.6892571Z
    DYMO.DLS.Printing.Host.exe Information: 0 : Utils.CreateLabelPrintParams(): printParams == null, creating default printParams based on printer type
    DateTime=2017-03-13T17:33:07.8691296Z
    DYMO.DLS.Printing.Host.exe Warning: 0 : LabelPrintLoop.Print(): Exception Type: NullReferenceException
    Object reference not set to an instance of an object.

    Stack Trace: at DYMO.DLS.Runtime.LabelPrintLoop.GetLabelOffsets(Label label)
    at DYMO.DLS.Runtime.LabelPrintLoop.PrintPage(PrintQueue printQueue, SerializerWriterCollator visualsCollator, ITextRecord textRecord)
    at DYMO.DLS.Runtime.LabelPrintLoop.Print()

    DateTime=2017-03-13T17:33:08.6067970Z
    DYMO.DLS.Printing.Host.exe Warning: 0 : LabelPrintLoop.Print(): visualsCollator.EndBatchWrite() failed: Exception Type: XpsWriterException
    Must call Write before calling EndBatchWrite.

    Stack Trace: at System.Windows.Xps.XpsWriterException.ThrowException(String message)
    at System.Windows.Xps.VisualsToXpsDocument.EndBatchWrite()
    at DYMO.DLS.Runtime.LabelPrintLoop.Print()

    DateTime=2017-03-13T17:33:08.6138016Z
    DYMO.DLS.Printing.Host.exe Information: 0 : Loading native printing lib from C:\Program Files (x86)\DYMO\DYMO Label Software\DYMOPrinting.dll
    DateTime=2017-03-13T17:33:08.6208069Z
    DYMO.DLS.Printing.Host.exe Error: 0 : WebMethod call failed: Printing Error: Object reference not set to an instance of an object.
    at DYMO.DLS.Runtime.Label.Print(Printer printer, LabelPrintParams printParams, Boolean endPrintJob)
    at DYMO.Label.Framework.Label.Print(IPrinter printer, IPrintParams printParams, IEnumerable`1 textSet)
    at DYMO.Label.Framework.Label.Print(IPrinter printer, IPrintParams printParams, String labelSetXml)
    at DYMO.Label.Framework.Framework.Print(String printerName, String printParamsXml, String labelXml, String labelSetXml)
    at DYMO.DLS.Printing.Host.DlsWindowsFramework.PrintLabel(String printerName, String printParamsXml, String labelXml, String labelSetXml)
    at DYMO.DLS.Printing.Service.DymoPrintingService.c__DisplayClass6.b__5()
    at DYMO.DLS.Printing.Service.WebUtils.ExecuteWrapped[T](Func`1 f)
    DateTime=2017-03-13T17:33:08.6901285Z

    __________________________

    This is a major issue and any help is appreciated.

    Louis

  43. Hello, I am not able to print labels with the ‘CustomPaper’ tag, only generic Dymo labels seem to print. Everything else results in a ‘Bad Request’. Example of a problem label that worked previously and loads fine in the label software is linked below.

    http://pastebin.com/19KjcAyr

    Any thoughts?

  44. Hello, I am not able to print labels with the ‘CustomPaper’ tag, only generic Dymo labels seem to print. Everything else results in a ‘Bad Request’. Example of a problem label that worked previously and loads fine in the label software is linked below.

    http://pastebin.com/19KjcAyr

    Any thoughts?

    • Hi Louis,

      Are you trying to create a label file manually? If not, how are you generating your label files? What version are you using?

      Thanks,
      Jeff

      • The only manual part of creating the label is altering the size of the label by using that tag. Once saved in an outside editor it can be loaded just fine into the current version of Dymo.

        From the pastebin above, I should note that lines 5 and 12 were accidentally included and to exclude them if testing.

  45. How to print .png(DYMO Stamps® Internet Postage Label 1 5/8″ x 1 1/4″) file in twin turbo 450 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 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);
    }

  46. As of recently, Chrome 58 (MacOS 10.11.6) will not go to https://localhost:41951/DYMO/DLS/Printing/Check as it fails the security SSL checking.

  47. Same problem here with the web service running on Windows Chrome Version 58.0.3029.81 (64-bit). It appears that the problem relates to Chrome requiring that the ‘subjectAltName’ field list the destination domain (‘localhost’ in our situation) in all self-signed certificates. The issue is described here: https://textslashplain.com/2017/03/10/chrome-deprecates-subject-cn-matching/

    Thanks for your help!

  48. I got this working flawless, only big flaw is that I cannot seem to print a barcode with 3 of 9 barcode font. It works in my HTML page fine, but the Dymo SDK simply wont use it…. it does nothing with it eventhough I have this in my XML

    Anyone knows how to solve this problem?

  49. YESSSSSSSSSSSSSS thank you for this article!

  50. Hello, I’m building a java application that needs to print to a Dymo printer. I’m loading the javascript API from the URL:http://labelwriter.com/software/dls/sdk/js/DYMO.Label.Framework.latest.js
    and then using the built in scripting engine to invoke various functions to add data that needs to be on the label. Do you have any examples or sample code that shows the correct flow to do such a thing (or something like that)? I’ve downloaded and installed DLS on the server as well, because I read that javascript API depends on that.
    Thanks for your help!

  51. Hello folks – any input on how best to print to a Dymo printer from a java SE application? I tried printing with built-in core APIs and the result is hit and miss, not to mention, conforming to a complicated label layout makes it even more interesting. Anyone here have similar experience? If yes, could you reply back with the approach that worked for you. Thanks!

  52. Click Diagnose -> Opens new browser tag with link https://localhost:41951/DYMO/DLS/Printing/Check
    and that link gives error page with ERR_EMPTY_RESPONSE

    Having issues connecting to Web Service but can print fine with the Dymo App.

    Thoughts anyone? Thanks

    • Hi Matt,

      Can you ping the DYMO Label Web Service?
      You can check the port number by using the tray application. If there is no DYMO Tray application, you will need to start it. The Tray application is the web service.

      Hope this helps,
      Ron

  53. Hi,

    I’m managing a WIndows 2008 RDS farm. Only a couple of users have a local USB Dymo labelwriter. How to prevent the “DYMO.DLS.printing host.exe to load for everyone logging in one RDS server ? (20 users means 20 occurrences of that… thing).

    BTW they are using the native software to print locally on USB… Is that “web service” required ?

    • Hi,

      The DYMO.DLS.printinghost.exe is an out of process COM server, so it will show up (briefly) for every user. Nothing you can do about that.
      As far as the web server goes, you can get rid of that if you are not printing via javascript.

      Ron

  54. Hi,

    Trying to print the labels from local PC (web page) while using the Web Service feature from Web Server (IIS). Somehow the connection is not making it possible to print the labels. Do you have a sample project that has a working code to compare please?

  55. Hello Ron or anyone!

    I am not getting how javascript on the client browser recognizes the printer/web service configured on the Server side (IIS server). Assuming client and server PCs are different, where do we specify which web service to be connected to? Also what happens if there are more than one printers configure, how to chose a specific one please? Sorry, I am new to this and any help would be greatly appreciated.

    Thanks in advance!
    Sunil

  56. Hi friends. I print from my web application ok, but, i need chech if job status is ok. I read the info into this blog, but my labelwriter response “not implemented”, and code still in loop because result is true all time.


    // print and get status
    var printJob = label.printAndPollStatus(printer.name, null, labelSet.toString(), function(printJob,
    printJobStatus)
    {
    // output status
    var statusStr = 'Job Status: ' + printJobStatus.statusMessage; <<<------ "Not impleented" value

    var result = (printJobStatus.status != dymo.label.framework.PrintJobStatus.ProcessingError
    && printJobStatus.status != dymo.label.framework.PrintJobStatus.Finished);

    // reenable when the job is done (either success or fail)
    printButton.disabled = result;

    setTextContent(jobStatusMessageSpan, statusStr);

    return result;

    }, 1000);

  57. So I read in one of the posts that the web service is confined to localhost for security reasons. I also saw someone on this blog post ask about a year ago about being able to print from a tablet. I’m trying to do something similar. I can print from a web page on the computer that the web service is running on just fine but I’m trying to figure out a way to be able to do the same from a tablet/phone on the same network either to a Dymo printer hooked to PC or to the Dymo wireless version. Is there a way to get this to work? Thank you.

    • Hi Mike,

      We have no built in way of printing using a tablet. You could create a proxy service on your pc for printing if you would like.

      • Thanks. The could work but we’re trying to make something that runs on a website for customers to use who have Dymo printers to print the labels directly from the site. A lot of the customers would be running the web application on a tablet/phone at home and trying to make it as simple as possible, hopefully without them having to worry about doing any major configuration or install anything additional.

      • Hey Mike,
        Just got my LabelWriter Wireless and was able to print to it directly using the DYMO Connect app on my iPad. Is there any timeline for releasing the SDK or frameworks that would allow us to print from our iOS apps to the LabelWriting Wireless
        Thanks,
        Jeff

  58. Wouldn’t a proper documentation manual for the Javascript framework be nice, rather than just a blog?

    Or if it does exist, wouldn’t a simple link to it on the Dymo web site page be nice? (Dymo > Support > SDK)

    This is a mess.

  59. Hi, service was printing in 2 seconds before but now PrintLabel call takes over 18 seconds. Could someone help me on that.

    Regards

    • Hello Joseph,

      We have identified the issue and are currently working on a fix. We will be releasing the fix ASAP.
      Until the actual fix goes out, users can alleviate this slowdown by preventing this call. We have seen success with two methods thus far.

      1: Prevent connections to 128.30.52.100 (hans-moleman.w3.org).
      2: Use the windows defender firewall to prevent DYMO.DLS.Printing.Host.exe from making outbound connections.

      We apologize for the inconvenience, and will update this post as soon as the situation has been resolved.

      Regards,
      Ron

      • Could you please let us know when the fix is out or the status of it? Some of my users are also experiencing this. While the temporary fix works on my end, I would like to not have users go through the additional steps to tweak their firewall.

        Please let us know when you think this patch might be available

        Thanks,
        Chris

  60. Ron, could you please explain the above comment in more detail? We’re currently running windows 10 and we too are experiencing extreme slowdowns. How do we implement the above in simple terms? Could you give a step by step instruction list, thanks.
    Steve

  61. So far everything is working great, but is there anything preventing malicious websites from accessing and printing with my DYMO if they find it?

  62. What kind of Promise are the async functions returning? I can use .then, but I cannot figure out how to do any error processing. None of these work:

    catch/fail/done/complete/always

    or is the problem that then() doesn’t return the promise as it should?

    • For example, I’m rendering a long list of labels. If I renderAsync in a loop, it gets exceptions (probably too many queued up labels, or this may be another error regarding timeout).
      So, I render recursively, in each .then handler, I call the method to render the next label:


      function renderLabel(i) {
      if (i >= $cbs.length) return;

      var $cb = $($cbs[i]);
      var xml = $cb.data('pl-label');
      if (xml) {
      var labelxml = dymo.label.framework.openLabelXml(xml);

      var p = labelxml.renderAsync().then(function (png) {
      var $img = $('').attr('src', 'data:image/png;base64,' + png);
      // make img clickable in label
      $img.css('pointer-events', 'none');
      $cb.append($img);
      renderLabel(i + 1);
      });
      }
      }

      However, if just one of the labels has an error of any kind, maybe invalid xml, nothing after that will render. There is no way to catch exceptions on these promises that I can find. There is a “thenCatch” method but it doesn’t seem to work like “catch”

Leave a Reply to Louis F Cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)