title: Why will my DYMO label not print from my website
body: <p>I am trying to install DYMO label printing on my website, I am using the sample from <a href="https://developers.dymo.com/#/article/238" rel="nofollow noreferrer">https://developers.dymo.com/#/article/238</a>.</p>
  <p>On the above sample when printing directly from their website it prints fine as it should, however using the exact copy of the codes on my website from <a href="https://www.devicecentral.co.uk/aaaaa.html" rel="nofollow noreferrer">https://www.devicecentral.co.uk/aaaaa.html</a> I am receiving no response from the print button.</p>
  <p>The html page being</p>
  <pre><code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
  &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;
  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;/&gt;
  &lt;title&gt;Print a Label&lt;/title&gt; 
  &lt;script src = &quot;http://labelwriter.com/software/dls/sdk/js/DYMO.Label.Framework.latest.js&quot; type=&quot;text/javascript&quot; charset=&quot;UTF-8&quot;&gt; &lt;/script&gt;
  &lt;!--&lt;script src=&quot;../../../dymo.label.framework.js&quot; type=&quot;text/javascript&quot; charset=&quot;UTF-8&quot;&gt; &lt;/script&gt;--&gt;
  &lt;script src = &quot;PrintLabel.js&quot; type=&quot;text/javascript&quot; charset=&quot;UTF-8&quot;&gt; &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;h1&gt;DYMO Label Framework JavaScript Library Samples: Print Label&lt;/h1&gt; 
   
      &lt;div id=&quot;textDiv&quot;&gt;
          &lt;label for=&quot;textTextArea&quot;&gt;Label text:&lt;/label&gt;&lt;br/&gt;
          &lt;textarea name=&quot;textTextArea&quot; id=&quot;textTextArea&quot;  rows='5' cols='40'&gt;&lt;/textarea&gt;
      &lt;/div&gt;
  
          &lt;div id=&quot;printDiv&quot;&gt;
              &lt;button id=&quot;printButton&quot;&gt;Print&lt;/button&gt;
          &lt;/div&gt;
  
  &lt;/body&gt; 
   
  &lt;/html&gt; 
  </code></pre>
  <p>and the PrintLabel.js being</p>
  <pre><code>//----------------------------------------------------------------------------
  //
  //  $Id: PrintLabel.js 38773 2015-09-17 11:45:41Z nmikalko $ 
  //
  // Project -------------------------------------------------------------------
  //
  //  DYMO Label Framework
  //
  // Content -------------------------------------------------------------------
  //
  //  DYMO Label Framework JavaScript Library Samples: Print label
  //
  //----------------------------------------------------------------------------
  //
  //  Copyright (c), 2010, Sanford, L.P. All Rights Reserved.
  //
  //----------------------------------------------------------------------------
  
  
  (function()
  {
      // called when the document completly loaded
      function onload()
      {
          var textTextArea = document.getElementById('textTextArea');
          var printButton = document.getElementById('printButton');
  
          // prints the label
          printButton.onclick = function()
          {
              try
              {
                  // open label
                  var labelXml = '&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\
      &lt;DieCutLabel Version=&quot;8.0&quot; Units=&quot;twips&quot;&gt;\
          &lt;PaperOrientation&gt;Landscape&lt;/PaperOrientation&gt;\
          &lt;Id&gt;Address&lt;/Id&gt;\
          &lt;PaperName&gt;30252 Address&lt;/PaperName&gt;\
          &lt;DrawCommands/&gt;\
          &lt;ObjectInfo&gt;\
              &lt;TextObject&gt;\
                  &lt;Name&gt;Text&lt;/Name&gt;\
                  &lt;ForeColor Alpha=&quot;255&quot; Red=&quot;0&quot; Green=&quot;0&quot; Blue=&quot;0&quot; /&gt;\
                  &lt;BackColor Alpha=&quot;0&quot; Red=&quot;255&quot; Green=&quot;255&quot; Blue=&quot;255&quot; /&gt;\
                  &lt;LinkedObjectName&gt;&lt;/LinkedObjectName&gt;\
                  &lt;Rotation&gt;Rotation0&lt;/Rotation&gt;\
                  &lt;IsMirrored&gt;False&lt;/IsMirrored&gt;\
                  &lt;IsVariable&gt;True&lt;/IsVariable&gt;\
                  &lt;HorizontalAlignment&gt;Left&lt;/HorizontalAlignment&gt;\
                  &lt;VerticalAlignment&gt;Middle&lt;/VerticalAlignment&gt;\
                  &lt;TextFitMode&gt;ShrinkToFit&lt;/TextFitMode&gt;\
                  &lt;UseFullFontHeight&gt;True&lt;/UseFullFontHeight&gt;\
                  &lt;Verticalized&gt;False&lt;/Verticalized&gt;\
                  &lt;StyledText/&gt;\
              &lt;/TextObject&gt;\
              &lt;Bounds X=&quot;332&quot; Y=&quot;150&quot; Width=&quot;4455&quot; Height=&quot;1260&quot; /&gt;\
          &lt;/ObjectInfo&gt;\
      &lt;/DieCutLabel&gt;';
                  var label = dymo.label.framework.openLabelXml(labelXml);
  
                  // set label text
                  label.setObjectText(&quot;Text&quot;, textTextArea.value);
                  
                  // select printer to print on
                  // for simplicity sake just use the first LabelWriter printer
                  var printers = dymo.label.framework.getPrinters();
                  if (printers.length == 0)
                      throw &quot;No DYMO printers are installed. Install DYMO printers.&quot;;
  
                  var printerName = &quot;&quot;;
                  for (var i = 0; i &lt; printers.length; ++i)
                  {
                      var printer = printers[i];
                      if (printer.printerType == &quot;LabelWriterPrinter&quot;)
                      {
                          printerName = printer.name;
                          break;
                      }
                  }
                  
                  if (printerName == &quot;&quot;)
                      throw &quot;No LabelWriter printers found. Install LabelWriter printer&quot;;
  
                  // finally print the label
                  label.print(printerName);
              }
              catch(e)
              {
                  alert(e.message || e);
              }
          }
      };
  
     function initTests()
      {
          if(dymo.label.framework.init)
          {
              //dymo.label.framework.trace = true;
              dymo.label.framework.init(onload);
          } else {
              onload();
          }
      }
  
      // register onload event
      if (window.addEventListener)
          window.addEventListener(&quot;load&quot;, initTests, false);
      else if (window.attachEvent)
          window.attachEvent(&quot;onload&quot;, initTests);
      else
          window.onload = initTests;
  
  } ());
  </code></pre>
  <p>Is anyone able to help me with why this will not print from my website but will print from <a href="http://www.labelwriter.com/software/dls/sdk/samples/js/PrintLabel/PrintLabel.html" rel="nofollow noreferrer">http://www.labelwriter.com/software/dls/sdk/samples/js/PrintLabel/PrintLabel.html</a> with the exact same code?</p>
  <p>Any help much appreciated.</p>