We are proud to announce the Open Beta of the new DYMO Label Framework JavaScript Library 2.0. This solution uses a new communication mechanism that will work on all browsers. This means that we have removed the dependency of browser specific plugins like NPAPI and Active-X. The current DYMO Label Framework API is fully supported.
Requirements
- DYMO Label 8.5.1
- Windows 8 and higher may require the patch KB2954953
- DYMO Web Service Beta Installer
- DYMO Label Framework JavaScript Library 2.0 Beta
- An available TCP port within the range 41951 – 41960
The new init method
Since the new communication protocol needs to discover the port that the DYMO service is listening on, a new method was introduced, dymo.label.framework.init(callback). This method performs a scan of a range of ports to look for the DYMO service. This method needs to finish before any other DYMO Framework API calls are made. To accomplish this, the method takes a callback method that will be called as soon as the dymo.label.framework.init method finishes.
Backward Compatibility Mode
If the dymo.label.framework.init method is not called (i.e. no user code has been changed) then the Framework goes into backward compatibility mode. It will try to scan the first port in the defined range and if it finds the service, the new communication protocol will be used. If it fails, it will fall back to the previous implementation that uses native plugins (NPAPI/Active-X).
Init Example
Typical startup code where a method is subscribed to an onload event:
function startupCode() { /* access DYMO Label Framework Library */ } window.onload = startupCode;
The code should be changed to call a shim that will initialize the DYMO Framework before calling the rest of the startup code.
function startupCode() {
/* access DYMO Label Framework Library */
}
function frameworkInitShim() {
dymo.label.framework.init(startupCode); //init, then invoke a callback
}
window.onload = frameworkInitShim;
Tracing
We have added a new tracing feature. This can be used to help debug issues with the new service. The property is called dymo.label.framework.trace. When set to true, it will put tracing messages in the browser developer console. You should set the trace property before calling the dymo.label.framework.init method:
Tracing Example
dymo.label.framework.trace = 1; //true
dymo.label.framework.init(startupCode);
Known Limitations
- The port number that the service binds to is not user definable. We tried to use a range of ports that are not typically used but there could be port conflicts.
- HTTPS: Because the service currently uses insecure (http) requests, some browsers may have some issues. For example, Firefox will block insecure XHR requests when a page is loaded through HTTPS. So in order to enable it, the user has to click icon in the address bar and enable insecure requests within a secure connection.
- As stated in the requirements, a Microsoft patch is typically required on Windows 8 and greater.
- MacOSX support is not included in this Beta, we are working on it now and we will post more news about this version soon.
- As with DLS, we do not support Windows Server configurations.
To Do
- A new version of the DYMO Label Software 8.5.2 will become available. This version will include the new Framework implementation and will be considered the Release version of the new Framework. This is expected to be released near the end of September.
- Service Configuration (Port Number): Currently, the service will bind to the first available port within a given range. We will add a parameter that will allow a user to assign a particular port within the given range.
- Investigate the best way to work over HTTPS without issues
- We are implementing asynchronous versions of existing API methods
- Take constructive feedback and bug reports from our Beta Customers. We will be releasing new versions of the Beta as we respond to issues found in the field.
Update 08/28/2015
If the Web Service fails to install, try and turn off your Anti-virus software before installing.
Update 09/09/2015
We apologize for the delay of the next version of the Beta. We’ve have been working on full HTTPS support, for which testing is ongoing, we found some issues and want to fix them before releasing. We’ve also reproduced the service not recognizing networked printers. We are investigating the possible solutions since it appears to be a limitation of what the service has access to. We’ll keep you informed of any developments.