Sep 302015
 

Hello everyone,

A lot of our SDK users are running into a particular issue printing barcodes where they will be clipped or not printed at all. The issue is actually being caused by a bug in the .NET Framework (v4.0 and newer), specifically in XPS printing. The trigger for the issue is when our printers go into “Barcode and graphics” mode. Unless manually overridden, the DYMO SDK will switch the printer to “Barcode and graphics” mode whenever a barcode or image object is present on the label. When in this special mode, the resolution of the printer changes from 300 x 300 DPI to 300 x 600 DPI. This “non-square” resolution is not handled correctly by XPS and causes the clipping issues.

Below is an example of this issue. The label on top is OK while the label on the bottom is printed with the issue.

IMG1

What you may notice is the label with the issue stops printing at a distance across the label that is equal to the width of the label. This is the crux of the XPS bug and as you can see, also affects other label object types as well.

IMG2

Now that we understand the issue a little better, what can we do about it? Let me start by saying that we have made Microsoft aware of this issue. Since there are no guarantees they will fix the problem, we are currently working on a solution that will be pushed out in a future update of DYMO Label Software. In the meantime, you have a few choices for working around the issue:

  • Design your label in portrait orientation. For most label types, the issue will not arise if the label is printed in portrait orientation. By using the object rotation feature in DLS, you can easily design a label in portrait orientation that will look identical to one designed in landscape orientation.
  • Compile your SDK applications against .NET 3.5. As mentioned earlier, the issue is with .NET Framework versions 4.0 and newer. Current versions of DLS are compiled against .NET 3.5 so you will not see this issue when printing from DLS. However, if you are compiling your SDK application against newer versions of .NET, when your application runs, the newer version of the framework will be loaded. Even though the DYMO SDK binaries are compiled against 3.5, .NET backwards compatibility will kick in and the newer version will be used instead. So, to take this approach, you will need to compile your SDK application against .NET 3.5.
  • Force the print job into “Text” mode. In the DYMO Framework, you can override the print quality setting using the ILabel.Print(IPrinter, IPrintParams) API. An example of how to override this setting can be seen below (the parameter used to change the print quality is marked in bold):

    LabelWriterPrintParams prms = new LabelWriterPrintParams(1, "print job 1", FlowDirection.LeftToRight, RollSelection.Auto, LabelWriterPrintQuality.Text);
    _label.Print(printer, prms);

Thanks for bearing with us on this issue. Rest assured we are working hard to get the fix out. In the meantime, we hope this blog post will help you get your labels printing correctly.

  45 Responses to “Barcode Printing Issues”

  1. We’re experiencing the opposite issue. I can’t say for sure it’s related to .net 4 or not, but on a fresh install of the Dymo framework on windows 8, I am unable to get the printer to print 300×600 resolution in the Dymo software, or in our app.

    If I go into printer properties & set the default to “best” quality and/or manually set to barcode/graphics mode & 300×600 resolution, and print to it as a standard printer from a browser, etc, it will print in high res mode, but no matter what I do in “Dymo Label V8” it is always in low resolution. This makes barcodes unscannable.

    I’ve already tried swapping the printer, uninstalling & reinstalling the software. Trying a different windows user. Uninstalling the software & manually deleting printer driver registry keys & dll files & reinstalling under a different user.

    • I am not able to duplicate the issue here and we haven’t heard about such an issue yet. Please make sure that you applied all Microsoft Windows Updates. Furthermore make sure that you are using the latest DYMO Label Software (DLS) 8.5.1.
      If you still encounter same issue with DLS then please go ahead and report your issue to DYMO tech support according to the following blog post http://developers.dymo.com/2011/10/12/sdk-troubleshooting-tips/

    • I had the same problem.
      this is what i did to fix it.
      I download the barcode file from amazon and then it opens as a pdf that i have to copy with the printer software.
      originally the image i was coping and pasting was not clear enough to paste a high enough resolution for the scanner to scan the image.
      What i did was before i copy the image i zoom in on it first and make it bigger. I can then screen copy the image and get a way higher resolution and then i can resize the barcode in the dymo software before printing.

      I have no problems since this.

      Simply put. increase the image quality by zooming in on it first before you copy the image over to the Dymo software.
      Because the dymo software as far as i can tell just does a screen capture. The image needs to be clear and high res before you move it over.

      Hope that helps.

      Cheers
      Ron

  2. I can reproduce the issue with .NET 4 but i have also a different (annoying) problem that happens on my 4k monitor.
    When i run my Windows Form program and access the Dymo libraries (for example cycling on printers or print a label) the form change its resolution and all is a mess.

    In this images you can see what i mean:

    https://www.papersoft.it/temp/before.jpg
    https://www.papersoft.it/temp/after.jpg

    It is a cycling issue. First run is ok. Second one is broken. Third is ok and so on..

    Keep in mind that i have also the zoom on windows preferences so it is possible that something happens on that form

    Andrea

    • Andrea,

      Do you see this issue only when using our SDK? It seems like it might be something more generic and related to your 4K monitor/zooming preferences.

      • Unlucky this happens only when i’m using your SDK and only if i access the DLLs. If i run the program without accessing the SDK nothing weird happens. Not only. The first time that the program works correctly if i print a label the window is resized like the second image

        • Is your graphics driver up-to-date?

          • Yes. It is all update. But i’ve discovered that is not a 4k problem but a zoom problem. If i remove the object zoom from screen resolution all works correctly.
            These are my zoom options:

            https://www.papersoft.it/temp/zoom.jpg

            If i put back the zoom to 100% all works correctly. So the problem is not the 4k monitor or resolution but the zoom.
            Indeed it happens also on my laptop on windows 10. It is easy to reproduce:

            Change the zoom resolution to something different than 100% try to run a winforms program and you will see the problem

            It is possible that you get some screen informations using the win32 dlls that is not released correctly?

          • I am having the same problem with my winforms app. On the print call, the screen resizes smaller and stays smaller. Take out the print call and the app functions properly.

            Running this on a Surface Pro 3 / Windows 8.

            Not sure what “Zoom” setting to change.

          • What version of our software are you running?

  3. I ran into this problem: the text extends over the continuous paper.

    Screenshot

    But why? I must set some margin to the right side and then it’s printing correctly. But it should be ok with default setup too, no?

    • I am not able to duplicate the issue with the DYMO Continuous Paper (30270). It looks to me that your continuous paper isn’t wide enough. Are you using DYMO Continuous Paper (30270)? What is the width of your continuous paper?

  4. OK where are we at with this major DYMO printing problem? Microsoft just released .Net 4.6.1 – Is the DYMO bar-code printer problem fixed in this release? We need a status update on this.

    • As above need a status update. Also have this issue on portrait designed labels :(

      • We have been developing a workaround to the Windows defect that is causing this issue. Unfortunately, it involves some big changes in our printing workflows. These changes will need extensive testing before we can release anything and we can not commit to a release date of the fix. In the meantime, it is recommended to use the workarounds defined in this original post.

  5. Hello,

    my question could be a little bit off-topic but any kind of help would be very appreciated: someone know how is it possible to set printing resolution using the javascript framework or how to speed up the barcode printing process ?

    thank you for your kindly support

    • Hi Alberto,

      Unfortunately, there is no way for you to set your own printing resolution. As for speeding up the barcode printing process, we actually print barcodes at a higher resolution to ensure quality, this is why there is a slower printing speed while printing barcodes.

  6. Designing the label in portrait orientation was the only way I was able to print the Barcode correctly using the SDK, .NET Framework 4.0 and Windows 10.

  7. When I print with your example projects I still get the same problem.
    With any kind of barcode it works perfectly , but I need to print EAN-8 code,
    everytime I try to print it my dymo just prints a blank.
    When I use an other code it works just like it should.
    Any solutions ?
    I need to use the EAN-8 code.
    I work with VB.NET.
    When I use the old V2 version it works but with the V4 version it doesn’t.
    And the rest of my program is written in V4.

    • Hi Tom,

      Have you tried any of the workarounds listed in this blog post? If so, did you see the same results? Also, what label size are you using?

  8. I’m trying to print a label from a php or javascript page. I’m getting an “Uncaught Error: Failed to execute webservice command: 400:”. I suspect I’m not getting something initialized or started correctly, but I have no idea where to turn. I haven’t been able to find any javascript examples, although they are supposed to be downloaded with the SDK. Any ideas where to turn?

  9. Hello,
    I tried to set the printing mode to text but it does not work; I cannot switch to .net 3.5 so I’m blocked.
    Any way to fix it ? Do you have an ETA on the new version?

    • Hi Daniele, no ETA on the fix just yet. Is switching to portrait orientation an option for you as that will resolve the issue as well?

      • Hello, I’m building my label directly using the framework (not using a .label file), is it enough that I change the orientation when creating the label or should I also rotate all the objects?

        • Daniele, changing the label to portrait orientation will resolve the clipping issue by itself. But for your label to look correct, you will need to rotate the label objects as well.

  10. I had the same problem.
    this is what i did to fix it.
    I download the barcode file from amazon and then it opens as a pdf that i have to copy with the printer software.
    originally the image i was coping and pasting was not clear enough to paste a high enough resolution for the scanner to scan the image.
    What i did was before i copy the image i zoom in on it first and make it bigger. I can then screen copy the image and get a way higher resolution and then i can resize the barcode in the dymo software before printing.

    I have no problems since this.

    Simply put. increase the image quality by zooming in on it first before you copy the image over to the Dymo software.
    Because the dymo software as far as i can tell just does a screen capture. The image needs to be clear and high res before you move it over.

    Hope that helps.

    Cheers
    Ron

  11. Do you happen to have a sample code with the orientation work around already implemented? Our developers are trying your suggestions but it is not working.

    • We do not have a sample for this. But the process is very easy. Just design your label in DLS in portrait orientation. You may need to rotate objects to achieve the same effect as printing in landscape mode.

  12. Hey Guys,

    Any update on this? As a software dev myself, I usually hate those guys that says this is un-acceptable…. etc… But… This is pretty crappy.

    Lots of programs print just fine with .Net 4.x… Any chance at all you can get this fixed soon. :)

    Thanks,

    Joey

    (A developer who just spent a whole day building a label framework to print labels from our software, only to find out now that it’s not going to work… And re-designing all the labels in portrait mode is not an option.)

  13. For anyone interested, for a quick solution that doesn’t involved re-doing your barcodes, you can write a simple C# WinForms app that will take a filename on the command line, print it, and then close You can use ILabel.SaveToXML() to save the label to xml. CAUTION: DYMO saves the xml with a UTF-16 header (First time I’ve seen UTF-16 xml since Lotus Notes almost 20 years ago, but I digress…) so when you save the string to a file, you HAVE to set the encoding to Unicode (aka UTF-16) or else it won’t work…

    You only need two lines to print the file from the command line on the first printer:

    ILabel label = DYMO.Label.Framework.Label.Open(Environment.GetCommandLineArgs()[1]);
    label.Print(new DYMO.Label.Framework.Printers().First());

    Cheers,

    Joey

  14. I have Win 10 Pro and Visual Studio Express 2015 I am trying to make a very simple visual basic code to print a barcode label and I think I have set the print parameters to text but I am still seeing the code cut off. Can anyone help?

    Dim label As DYMO.Label.Framework.ILabel
    label = DYMO.Label.Framework.Framework.Open(“C:\Labels\barcode2.label”)
    label.SetObjectText(“Barcode”, “965432”)

    Dim printparams As DYMO.Label.Framework.LabelWriterPrintParams = New DYMO.Label.Framework.LabelWriterPrintParams
    printparams.PrintQuality = DYMO.Label.Framework.LabelWriterPrintQuality.Text

    label.Print(“DYMO LabelWriter 450 Turbo”, printparams)

  15. Hello!

    I just bought the labelwriter 450 but am experiencing the exact same problem like stated above with cutting the code. Please help me implement your third step or I will have to return the printer because it cannot be used. This is for using the printer with the national post.

    Looking forward to your answer and hopefully solution.

    Br

    Ziga

  16. Worked great… I got the issue today and fortunately found this note… I ended up setting the label template to landscape and rotated all the controls to 270 degrees…

  17. Can’t believe this issue still exists! Pretty poor of Dymo not to have this resolved by now!

  18. In Dymo Label v.8.5.1814, I was able to rotate the barcode label vertically, then set each of the labels/text objects to 270 degrees by right-clicking on the barcode/label/text control, clicking properties, Advanced, then selecting 270 under Rotation. That fixes the barcode cut-off I was getting.

 Leave a 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)