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:
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).
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.
On Mac, the DLS application icon and context menu will appear within the system tray like this:
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.
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.
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.
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.
Hello,
do you have any working example how to read the weigh for Dymo scales?
Regards,
Alex
Hi Alex,
Please see section 4 of the following FAQ for suggestions on how to work with our scales:
http://developers.dymo.com/2012/12/26/dymo-sdk-faq-part-2/
Regards,
Jeff
Hi,
Do you have an example page showing DYMO Label JavaScript Library interacting with DYMO Label Web Service to print simple label?
We just added a nice article that should help you out:
http://developers.dymo.com/category/dymo-label-framework/
Hello,
Thanks for updates. Do you have any complete demos similar to your 2010 post?
http://developers.dymo.com/2010/06/02/dymo-label-framework-javascript-library-samples-print-a-label/
Big Fan, Thanks
Hi Christian,
We are working on it. Unfortunately, I don’t have an exact date yet as to when it will be released.
Regards,
Jeff
Hey Jeff,
is there already a working demo site? I would like to test it before I try to insert this in our Intranet Site
Greetings!
Hi,
What type of demo site are you looking for? If you install our SDK, you’ll find a few various demos you can run via localhost.
Regards,
Jeff
Hi –
The link you just posted http://developers.dymo.com/category/dymo-label-framework/ just circles back to this same page. Would you kindly let us know the correct page?
Thanks!
Have you tried the links at the top? There are PDF and DOC versions there.
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!
Ben,
No problem. Glad to see you’re happy with the debugging functionality!
Regards,
Jeff
Still no info about to change localhost address. :(
Hi Adrian,
What exactly are you trying to do?
Jeff
Could you see if this helps?
http://stackoverflow.com/questions/17652373/how-to-change-the-url-from-localhost-to-something-else-on-a-local-system-usin
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?
Have you tried starting Chrome with the –ssl-version-fallback-min=ssl3 option.
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.
Hi Dan,
What link are you currently using?
Jeff
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
Hi Robert,
Let me see what I can find for you.
Regards,
Jeff
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…
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
Hi Leah,
I am currently investigating this issue. I suspect it is using an old version of our JavaScript SDK. If so, then it will not work. I’ll take a look.
Jeff
It appears that sample was created with the old framework. Can you please try using a newer version of the JavaScript file found here:
http://www.labelwriter.com/software/dls/sdk/js/DYMO.Label.Framework_2.0.js
Thanks,
Jeff
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!
Hi,
What platform are you using to run the web service?
Regards,
Jeff
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.
Hi Brandon,
You can find the latest here:
http://www.labelwriter.com/software/dls/sdk/js/DYMO.Label.Framework_2.0.js
Regards,
Jeff
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
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
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;
Did you ever get this sorted out to move over to the Async requests?
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
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
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.
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?
Hi,
Try here for the El Capitan-compatible installer:
http://developers.dymo.com/2015/12/14/dymo-label-software-version-8-5-3-for-mac/
Regards,
Jeff
Jeff,
I am running 10.12.6 (Sierra). I have 8.6.2.134.
I cannot get the web service to start up. The Dymo Label app works ok.
Thanks,
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8
DYMO framework version 2.0.2
Checking DYMO framework support:
Browser: true
Framework: false
Web Service: false
DYMO framework error details: DYMO Label Plugin is not installed.
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
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
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
After some more investigation, it seems that it is a problem with Edge using HTTPS. Working on HTTP.
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
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.
Hi,
Do you notice this “stripping” behavior with all calls that have parameters or just those making use of our framework? Have you tried using a reverse proxy? Perhaps this will help you see what is going across the wire:
https://www.charlesproxy.com/documentation/proxying/reverse-proxy/
In the meantime, I will look into this and see what I can find.
Thanks,
Jeff
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.
##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
Is it just me or is there no option to not install the web service with the latest Dymo Software 8.6?
We will be releasing an update soon to address this.
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
You have to run the uninstaller.
Are you able to provide more of a defined timeframe for when you expect the update to 8.6 to be released?
Are goal is to have a release by the end of this month.
With the end of the month soon approaching, do you think you will meet this goal?
Hi DymoJeff —
Any chance of a Linux version of the Dymo Proxy?
There is talk about Linux support some time in the future but I haven’t heard anything concrete.
I’d second this “opportunity to excel” !!! Or any sort of sample code we can port ourselves.
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
Are you able to “ping” your server from any other device on the network?
Could someone please help me on previous question?
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.
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.
To what menu item are you referring?
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
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. “
The release that fixes this is in QA right now.
Thanks. Assuming all goes well, how soon do you think this will be released?
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!
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.
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.
How is everything going with the update to fix the RenderLabel request issue?
Our new DLS release should fix this.
Please download the new DLS release here:
http://developers.dymo.com/?p=1356
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?
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
Are you trying to generate the XML yourself or are you using our SDK to generate it for you?
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?
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.
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);
}
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.
We have a fix that is being tested today.
How did this test work out? We are experiencing the same issue…
Any updates on this? we have the same issue.
Please see the following:
http://developers.dymo.com/2017/05/04/google-chrome-not-secure-warning-fix-is-on-the-way/
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!
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?
YESSSSSSSSSSSSSS thank you for this article!
No problem.
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!
Hi, we have a very simple located at the following URL: http://www.labelwriter.com/software/dls/sdk/samples/js/PrintMeThatLabel/pl.html
We also have more samples available in the following ZIP file: http://www.labelwriter.com/software/dls/sdk/samples/SDKSamples.zip
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!
Our SDKs are exposes as COM objects that you should be able to use in your Java application. Take a look at some of the High and Low level COM samples in the following sample to get an idea of how the COM SDK is uses. We unfortunately don’t have any examples specific to Java.
http://www.labelwriter.com/software/dls/sdk/samples/SDKSamples.zip
Thanks you for your response. I failed to mention that my application needs to run exclusively on OSX, so I’m not sure using COM objects is an option, unfortunately.
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
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
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?
Hello Sunil,
You can get some more info here:
http://developers.dymo.com/2011/11/17/javascript-library-samples-printers-and-multiple-labels-printing/
Ron
Hello Ron!
Thank you so much! Going to try out this and let you know if hits a wall! Really appreciate getting back so quickly!
Thank you!
Sunil
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
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);
Hello Javier,
Can you give some background on this code snippet? Is it running as part of an Asp.Net page?
Ron
I get the same status code: ‘not implemented’. I am running on a php backend, and both Chrome and Firefox have the same issue (not tested with other browsers).
This behavior I also have on test sample page http://www.labelwriter.com/software/dls/sdk/samples/js/PrintMeThatLabel/pl.html
The Dymo printer is connected to a print server, not locally.
Any ideas on what is going wrong?
Does your code work if the printer is directly connected to the client machine?
Ron
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
Joe, we do not have a timeline at the moment for releasing mobile versions of our SDK.
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.
I feel your pain Kyle…
http://labelwriter.com/software/dls/sdk/docs/DYMOLabelFrameworkJavaScriptHelp/symbols/dymo.label.framework.html
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
We will put out a new blog entry so that everyone is informed. We are in the QA cycle now.
Ron
I think I see the update on this page: http://dls.dymo.com/en-US/Pages/DLS8Download.aspx
It might still be in a QA cycle — but for me, personally, that update fixed the problem!
I’ll still keep an eye on this thread.
Thanks for the quick reply
Chris
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
So far everything is working great, but is there anything preventing malicious websites from accessing and printing with my DYMO if they find it?
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”