Nov 292016
 

Hi everyone,

Over the years, there has been a lot of confusion regarding our SDK samples. In the past, to get our samples, you needed to download an “SDK Installer” from www.dymo.com. The “SDK Installer” name was a bit misleading as the installer only contained samples, no binaries. As you know, all the binaries required for our SDKs are installed as part of DLS. So in order to clear things up, we’ve consolidated all of our samples into one ZIP file. This ZIP file contains the following:

  • DYMO Framework Samples for C# and C++
  • DYMO SDK High-Level COM Samples for C++, C#, VB, and ASP.NET
  • DYMO SDK Low-Level COM Samples for C++
  • Documentation for both the DYMO Framework & DYMO SDK

This ZIP file can be downloaded here: SDKSamples.zip. Please note that all of the samples in the ZIP file are intended for use in Visual Studio 2015 and using .NET 4.5.1 where applicable.

We also have a number of JavaScript samples that can be explored. While we do not provide the source for these samples directly, you are free to use the dev tools within your favorite web browser to check out the source code for these samples.

  • Print Me That Label – a simple JavaScript sampled that can be used to check if DLS is installed properly and the JS SDK is functioning correctly
  • Preview and Print Label – see a preview of a label in the browser and print the label
  • Print 2 Labels – example of multiple label printing
  • QR Code – barcode printing example
  • Spreadsheet – example of printing multiple labels from an online data source

Furthermore, we have a a diagnostic sample that can be used to ensure your dev/client environment is setup correctly.

  • Check Environment – runs a quick check of your setup and brings to your attention any potential problems

Happy coding!

  77 Responses to “Sample, Samples, Samples!!!”

  1. Hi, sometime ago I developed an open source Windows program which use Meetup API, webcam, database, and Dymo SDK.

    The program download a list of members which go to a event, using an API, it put members in a database, and when a member in the event use a QR Code in the webcam, the program print a label with the member name in a Dymo Label.

    If someone want it: https://github.com/alefesouza/gdg-sp/tree/master/Desktop , and sorry for my bad english.

  2. Hello,

    Still no latest solution regarding Android Platform. I was waiting for a year :(. Hope there could be some in 2017

    Anyway thanks for the SDK and samples.

    Warren

  3. Hi,

    I’m currently trying to use Powershell on Windows 10 to automate address label printing with a LabelWriter 450 and the latest version of the Dymo Label software. The script works great except right at the end, where I’m getting a massively frustrating error on a simple but crucial step in the process.

    When I try to call [Dymo.Label.Framework.Framework]::GetLabelWriterPrinters(), I get the error:

    Exception calling “GetLabelWriterPrinters” with “0” argument(s): “Object reference not set to an instance of an object.”

    Any ideas why this is happening?? I’ve seen a number of samples and posts on here where this call is made with no issues, so I can only assume there’s something weird going on with the Dymo software / .NET / registry. Any insight would be much appreciated!

  4. Hi,
    i have Dymo LabelManager Pnp in Windows 10 with driver V8 and DLSSetup.8.5.3.1897.exe and the example above both in VB and C++ but nothing working.
    I can’t see the printer.
    With DLS8Setup.8.5.3.1889.exe i can see the printer but i can’t print.

    what can i do?
    Thanks in advantage

    Patrick

  5. Awesome, if you now make working sample for Dymo scales so I don’t have to use third party software that would be A+++

  6. HELP
    version 8.6 has been made available and users are getting prompted to update
    HOWEVER several elements of printing to labels in our webbased software is NOT WORKING with this version.

    I conctacted DYMO support and they said the following:
    ==================================
    Jen P (12/14/2016, 2:47:30 PM):
    It’s not the DYMO software, it is the browsers that stopped supporting our Framework.
    We made them aware that the update was coming out and they chose not to be compatible with the updated software.

    So, the issue you have may be with the web browsers, not our application.

    Me (12/14/2016, 2:48:06 PM): that was an older problem that was fixed in 8.5.3 if its broken again that is a huge issue.

    Jen P (12/14/2016, 2:48:46 PM):
    Version 8.5.3 allowed printing through third party, web based applications.
    The new version of software was updated, and the browsers chose not to update with us.

    Version 8.5.3 is what your clients will need to run if they wish to continue to use the DYMO Label Framework.

    Again, you are more than welcome to contact our Developers directly to see if they can add you to some kind of list that they may keep.
    ==================================

    So….
    I am surprised that there has been NO notice on this blog about the affect 8.6 will have to Framework!
    We are going to have to see if we can work around this OR we will have to find another solution.

    I cant believe this is not going to affect a large amount of software that is webbased and using DYMO …

    what is the alternative?

    And how long will 8.5.3 work?

    sign me completely shocked

  7. Yesterday I said everything works now BUT…

    Using 8.5.3 version and the new JS works perfectly, then I updated to 8.6 and now even the program don’t start. removed all and reinstall solved the dymo program but not the web service as I’m getting 400 error (POST https://localhost:41951/DYMO/DLS/Printing/PrintLabel 400 ()).
    I will investigate now and post later.

  8. Back to 8.5.3 and everything works again :-)
    For those that don’t keep the old version download it here https://we.tl/lbklOGdoSO

    • For all those that are experiencing issues with 8.6, can you confirm that the DYMO web service is running locally on the client? You should see an icon in the Windows tray:
      Web Service

      If it is running, can you right click on it and select Diagnose…. This will open a browser to let you know if the web service is up and running.

      • Yes, web service were there and the diagnostics is ok too, but 400 error if I do printing from file not on my PC locally.
        Currently installed 8.5.4.1913 and everything is working (after a few uninstall/installs). Win 10

  9. I haven’t completely tested 8.6 yet but it appears to be mostly working. I have found one issue so far, the “jobTitle” print param is ignored, it just shows up as “Printing Picture”.

  10. I have migrated our system to the new SDK/API.
    The first problem is that rendering labels with graphics always fail.
    I have removed the graphics and now the preview works.

    When I try to print I always get 400 bad request.
    I have tested also the samples here of:
    “Print me that label” and “Preview and Print Label” and both get me the same result.
    Can you confirmt hat these samples work for you with Dymo software 8.6.611?

  11. Also I check the environment with the check environment sample and got:

    isBrowserSupported: true
    isFrameworkInstalled: true
    isWebServicePresent: true

  12. Can I downgrade/do anything to get it back to work until then?

  13. Any samples for JavaScript? I downloaded DLS 8.6 and now my web applications will no longer function. I uninstalled 8.6 and installed 8.5 and they work again. When on 8.6 and using Visual Studio I have an error on each page:

    Type ‘DYMO.Label.Framework.ILabel’ is not defined.

    Did you drop JavaScript support for 8.6?

    • Nevermind. I simply removed the DYMO.Label.Framework.ILabel and updated the javascript from the older DYMO.Label.Framework.ILabel to your newer DYMO.Label.Framework_2.0.js and it seems to be working again.

  14. Not too many code samples in 8.6 SDK for any VB and Access. Haven’t figured out how to manipulate font type and size. Web server is not needed. Tried all three DYMO objects (AddIn, Labels, LableEngine) without success. Found no code samples here.

    • Hi Harold,

      I downloaded the SDKSamples.zip file and was able to find a VB sample under SDK Samples\High Level COM\dotNet\VM Sample.

      Regards,
      Jeff

      • Jeff,
        Thank you. I didn’t explain myself clearly, sorry. Found dozens more template *.Label files buried in another dir. With them I can cut and paste to create a template I need.

        I still haven’t found a way to manipulate font name, size and other properties from code.

        Again, thank you.
        Harold

      • Jeff,
        Just found the graphic interface for designing label templates. Guess I’m still having trouble getting over having to program everything. Been programing since windows ver 1 and gwBasic. :)

        Harold

  15. Hello,

    could you please help me and tell how I can force Labelwriter to use TEXT quality with barcodes (when using javascript framework)?

    I have tried many different commands, but always normal barcodes prints very slowly. Only QR code prints OK after I changed quality in DYMO Label v.8 software. Still example UPC codes prints slowly!

    • Hi Antti,

      My understanding is that you want to print barcodes using the fast speed instead of the slow speed, correct? That is not a good idea, because if you print barcodes with draft quality they end up being unscannable. That’s probably why the example UPC codes print slowly.

      Regards,
      Jeff

      • Hi Jeff,

        yes faster speed is that what I want just now :)!
        I know that faster speed is same as weaker quality, but still I want print my labels by using TEXT quality instead of Barcodes and graphics.

        I printed UPC barcodes with Dymo label software and always barcodes were scannable even I selected Text -quality (= faster). Now I would like to know how can I force js framework to use that text-quality? I suppose that it should be possible?

        B.R.,
        Antti

  16. Running latest JS SDK codes. On MacOS. All diagnostics checkout fine for the web service. In the Browsers (Chrome and Safari) the checkEnvironment is:

    [Log] checkEnvironment > cachedWebPort : 41951 (dymo.js, line 107)
    [Log] checkEnvironment > trying async service discovery (dymo.js, line 107)
    [Log] _createFramework > return _framework : undefined (async) (dymo.js, line 107)
    [Log] onEnvironmentChecked > checkResult isBrowserSupported : true, isFrameworkInstalled: true, isWebServicePresent: true, errorDetails: (dymo.js, line 107)
    [Log] chooseEnvironment > WebServicePresent (dymo.js, line 107)
    [Log] Printer should be OK now with the init we did… (products, line 83)

    But NO PRINTERS are ever reported as found, making this a problem. Can anyone point me in the right direction for getting printers to be found please.

    Thanks

  17. Hi, I have an application that uses the label framework with .net framework 4.0;
    Upgrading to dls 8.6 breaks my application and I cannot add the new DYMO.Label.Framework dll because it’s compiled with .net 4.51
    Do you have a version compiled with .net 4.0 ? I cannot change the framework on my application because I need to support a lot of old xp installations still active.

    • Hi Daniele,

      We no longer support Windows XP. What version of the installer were you using previously?

      Regards,
      Jeff

  18. Hi I have had a Web based solution in place for a few months but the deployed application started issuing an error message: –
    PrintTicket provider failed to bind to printer. Win32 error: -2147467231

    I found that by changing the Application Pool to use a User Profile with administrator permissions, the problem was resolved.

    I cannot leave the live environment with this configuration, is anyone able to shed any light on what permissions may be needed that is not available to the standard IIS_USRS profile.

    The environment details are as follows: –
    Web Server is Windows Small Business Server 2011 Standard
    Development PC is Windows 10

    Application written in ASP.Net VB using Visual Studio 2015

    DYMO software is 8.5.3 on the server, trying to fix the problem I upgraded to 8.6.1 on the PC This now prevents me from changing anything in the live environment until I upgrade DYMO on the server or downgrade my PC back to 8.5.3

    The problem does not manifest itself when running in VS 2015 debug mode, it is only a problem once published to IIS, which is what led me to check permissions on the Application Pool. This solution does not work on the PC though, but that may be because I have the User details configured incorrectly.

    When it does work properly it prints labels from records selected from a gridview list with both text and images.

    I hope someone is able to help.

  19. Hi,
    I’m integrating the DLS COM SDK into an C#.net application and was wondering if it’s possible to get a ‘preview’ of the label with the filled in data as an image through the SDK.

    Thanks for the response.

    Iman

  20. There’s mention in the previous blog posts about where to find the XML Schema;
    The complete xml schema for the label file format is available on http://www.labelwriter.com/software/dls/sdk/LabelFile.xsd

    However, formats saved with DYMO Label v.8.6.611.42161 have elements that aren’t defined in that xsd, for example;
    and

    Is there a version of the schema that has those elements defined? and if so where is it?

  21. Hello,

    i have successfully used the javascript-sdk to print labels on the computer where the printer is attached to (aka localhost).

    My question: Is it possible to print from a remote computer, which has not installed the printer driver and sdk? I’ve tried opening the website served by apache web server, but getting “No DYMO printers are installed. Install DYMO printers.”
    Tried also calling the webservice directly. Results in “HTTP Error 400. The request hostname is invalid.”

    Thx for the response.
    WaTho

  22. Hi,

    The JavaScript framework is excellent. However, I have 2 questions to anyone that can help. I have not been able to find information on the following:

    #1
    How do I get a finished callback or track the progress/status of a single print? I would like to show the user the status of a single print so that they do not press the button twice.

    #2
    Where can I find the JavaScript framework’s API documentation?

    Kind regards

    • Hi Geoff,

      The API documentation is included within the SDK’s ZIP file. You should be able to find the answer to your first question within there.

      Thanks,
      Jeff

  23. Hi,

    I’ve recently updated an app to use the js framework and it works fine on OSX but on Windows I’m coming across two different errors.
    1: When trying to render a preview (label.render(renderXML)) with an ImageObject that contains a base 64 string in the tag (and not just a source url) it gets an error “[0] The calling thread must be STA, because many UI components require this.”

    2: When printing, if the text fields font tag is not self closing but rather it errors when trying to print. “[0] Value cannot be null.\u000d\u000aParameter name: String [1] There is an error in XML document (27,106). [2] There is an error in XML document (27,106). [3] There is an error in XML document (27,106). [4] There is an error in XML document (27,106). [5] Unable to load label template ” and due to how the xml is generated on the server there isn’t much control over how it closes tags, besides for this being unexpected.

  24. I just worked from the samples and notes in the “DYMO Label Web Service FAQ” and converted my code to use the new Javascript method. After a few hiccups, it works (in Chrome/Edge/Firefox)! I found I had to put all my relevant code, starting from the creating of the listener on my Print button, into the DYMO “function onload() {…}” so the functions could access each other. Some of these were in a jQuery ready function previously.

    My print button is in a jQuery dialog. In that dialog initialization, I have the Print button calling my print function when used. That print does some jQuery $.ajax to get the labelset XML. Then that is loaded into the label, it checks for a printer, and prints.

    It felt odd to put functions that were in my jQuery ready function into the DYMO “function onload() {…}”. I ended up putting the jQuery ready function on the outside surrounding the DYMO onload function. Theoretically a document.ready should happen before or at the same time as window.onload, right?

    Is that the right way to do it?

  25. Both the SDK FAQ http://www.dymo.com/en-US/online-support/online-support-faqs/sdk-faqs and the SDK Manual mentioned VBScript samples but the sample code is nowhere to be found. Is there a simple, ‘5 lines of code’ VBScript sample somewhere like what’s mentioned in the FAQ? Thanks.

  26. Hello,
    I have just installed the latest version of DLS with webservice.
    Everything seems to be ok.
    If i try to print through your example pl.html , the printer is recognized and I can print normally, but if i try from a remote pc to insert the url (tried also locally specifing http://localhost:41951 but didnt work) i get this error: cannot connect to ip:port
    I have also opened the specific port on firewall but no changes.
    host OS is windows 2012

    Can you be so kind to help me to troubleshoot this issue? Thank you in advance

  27. Loaded Dymo Label 8.6.1.42858. Works fine. Loaded V8 SDK. Tried using the samples in C# and VB using VS 2015 and they compile fine but do not print. Any ideas?

    • I see these exceptions when running:
      Activated Event Time Duration Thread
      Exception: Exception thrown: ‘System.IO.FileNotFoundException’ in mscorlib.dll (“Could not load file or assembly ‘DYMO.DLS.XmlSerializers, Version=8.6.1.42858, Culture=neutral, PublicKeyToken=5426002a38745af9’ or one of its dependencies. The system cannot find the file specified.”). Exception thrown: ‘System.IO.FileNotFoundException’ in mscorlib.dll (“Could not load file or assembly ‘DYMO.DLS.XmlSerializers, Version=8.6.1.42858, Culture=neutral, PublicKeyToken=5426002a38745af9’ or one of its dependencies. The system cannot find the file specified.”) 0.68s [3916]

      Activated Event Time Duration Thread
      Exception: Exception caught: ‘System.IO.FileNotFoundException’ in mscorlib.dll (“Could not load file or assembly ‘DYMO.DLS.XmlSerializers, Version=8.6.1.42858, Culture=neutral, PublicKeyToken=5426002a38745af9’ or one of its dependencies. The system cannot find the file specified.”). Exception caught: ‘System.IO.FileNotFoundException’ in mscorlib.dll (“Could not load file or assembly ‘DYMO.DLS.XmlSerializers, Version=8.6.1.42858, Culture=neutral, PublicKeyToken=5426002a38745af9’ or one of its dependencies. The system cannot find the file specified.”) 0.68s [3916]

      • Hi Dan,

        Are you running your own application of is this a result of running one of the samples? If so, which one?

        thanks,

        Ron

        • Hi Ron,

          This is running the VB sample.

          Dan

          • Hi Ron,

            Note, my own VB application does the same thing. That led me to try the sample to see if I could determine what was wrong. DMO Label V8 prints fine.

            Dan

    • Hi Dan,

      Can you get a list of printers from the SDK?

      Ron

      • Hi Ron,

        This is my sample file path from the ZIP file:

        SDK Samples\High Level COM\dotNet\VB Sample

        Dan

  28. Can someone point me in the right direction so that I can figure out how to print a label with a product description, price, and a UPC label? I wish to do this with the javascript SDK.

    Thanks.

  29. Yes, the DYMO LabelWriter 450 shows up in the pull down box. Just get the exceptions when I try to print.

  30. Hello,

    Firstly, thank you for this cool framework.

    I can print labels on Chrome and Firefox but Safari couldn’t get the printers. Is there any plug-in for Safari v10.1.1?

    Also, I couldn’t get any result when I tried to check environments via http://labelwriter.com/software/dls/sdk/samples/js/CheckEnvironment/CheckEnvironment.html on Safari?

    Thanks

    • Is DLS installed on your MAC? You will need to make sure the webservice is running.

      Ron

    • We use a browser independent solution. The javascript connects to a webserver that is running on the local machine. We do not provide plug-ins for browsers anymore. Make sure your webserver is running is my best advice.

      Ron

  31. I created this label and the and have tried other labels that have worked but this is the exception that I get. This is in visual Studio 2017 C#.

    using DYMO.Label.framework;
    private void button1_Click(object sender, EventArgs e)
    {
    var label = DYMO.Label.Framework.Label.Open(@”\NRTLeakage.label”);
    }

    DYMO.DLS.Runtime.DlsRuntimeException: ‘Unable to load label template \NRTLeakage.label”

    The complete Path to the label is good I only show the last of it.

    XmlSchemaValidationException: The element ‘DieCutLabel’ has invalid child element ‘IsOutlined’. List of possible elements expected: ‘PaperName, CustomPaper’.

    This is as far as the debug will run

    Is the SDK broke? or is there a fix for this

    • Hi John,

      Does this label open properly in DLS? Are you using the same version of DLS to create the label and on the machine you are running your custom application?

      This problem looks like a mismatch of versions.

      Ron

  32. I am running the latest and gratest on both. I will try an uninstall on both to see if that works.

    • How did you create your label? We usually recommend creating the label in DLS and then use the label in your custom application.

      Ron

  33. Hi,

    I just tried looking at the example for printing multiple labels from a spreadsheet linked above:

    http://www.labelwriter.com/software/dls/sdk/samples/js/GoogleSpreadSheet/GoogleSpreadSheet.html

    but got an error that the spreadsheet does not exist. Is it possible to get that example restored? I’m looking for a way to print multiple labels from a web page and not sure if this is possible and how to go about it.

    thanks

  34. Hi,
    I try to run a C# sample in DYMO Label v.8 SDK with Visual Studio 2010 and Dymo Label v8.6.2. I got a compile errors “The type or namespace name ‘DYMO’ could not be found (are you missing a using directive or an assembly reference?)”. It does not find DYMO.Label.Framework, but reference shows correctly.

    Any idea what could be the problem?

    Thanks

    • Hi Chris,

      I would recommend starting with one of our samples. Assuming the sample works for you, you should be able to copy the appropriate references into your project.

      Ron

Leave a Reply to Harold Trudeau 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)