dymosoftware / dymo-connect-framework Goto Github PK
View Code? Open in Web Editor NEWDYMO Connect Framework for Javascript.
License: Other
DYMO Connect Framework for Javascript.
License: Other
Creating a separate issue thread for new issue that came from the fix of issue #30 using latest beta DLSSidecar_1.4.3-147-beta-WS.exe.
HTTP 400 error:
Error printing label. Exception: 'Element' is an invalid XmlNodeType. Line 22, position 4.
This is the labelXml:
<?xml version="1.0" encoding="utf-8"?>
<DesktopLabel Version="1">
<DYMOLabel Version="3">
<Description>DYMO Label</Description>
<Orientation>Landscape</Orientation>
<LabelName>Address</LabelName>
<InitialLength>0</InitialLength>
<BorderStyle>SolidLine</BorderStyle>
<DYMORect>
<DYMOPoint>
<X>0.23</X>
<Y>0.06</Y>
</DYMOPoint>
<Size>
<Width>3.21</Width>
<Height>0.9966667</Height>
</Size>
</DYMORect>
<BorderColor>
<SolidColorBrush>
<Color A="1" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</BorderColor>
<BorderThickness>1</BorderThickness>
<Show_Border>False</Show_Border>
<DynamicLayoutManager>
<RotationBehavior>ClearObjects</RotationBehavior>
<LabelObjects>
<AddressObject>
<Name>Address</Name>
<Brushes>
<BackgroundBrush>
<SolidColorBrush>
<Color A="0" R="1" G="1" B="1"></Color>
</SolidColorBrush>
</BackgroundBrush>
<BorderBrush>
<SolidColorBrush>
<Color A="1" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</BorderBrush>
<StrokeBrush>
<SolidColorBrush>
<Color A="1" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</StrokeBrush>
<FillBrush>
<SolidColorBrush>
<Color A="0" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</FillBrush>
</Brushes>
<Rotation>Rotation0</Rotation>
<OutlineThickness>1</OutlineThickness>
<IsOutlined>False</IsOutlined>
<BorderStyle>SolidLine</BorderStyle>
<Margin>
<DYMOThickness Left="0" Top="0" Right="0" Bottom="0" />
</Margin>
<HorizontalAlignment>Left</HorizontalAlignment>
<VerticalAlignment>Middle</VerticalAlignment>
<FitMode>AlwaysFit</FitMode>
<IsVertical>False</IsVertical>
<FormattedText>
<FitMode>AlwaysFit</FitMode>
<HorizontalAlignment>Left</HorizontalAlignment>
<VerticalAlignment>Middle</VerticalAlignment>
<IsVertical>False</IsVertical>
<LineTextSpan>
<TextSpan>
<Text>DYMO</Text>
<FontInfo>
<FontName>Segoe UI</FontName>
<FontSize>8.8</FontSize>
<IsBold>False</IsBold>
<IsItalic>False</IsItalic>
<IsUnderline>False</IsUnderline>
<FontBrush>
<SolidColorBrush>
<Color A="1" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</FontBrush>
</FontInfo>
</TextSpan>
</LineTextSpan>
<LineTextSpan>
<TextSpan>
<Text>3 Glenlake Parkway</Text>
<FontInfo>
<FontName>Segoe UI</FontName>
<FontSize>8.8</FontSize>
<IsBold>False</IsBold>
<IsItalic>False</IsItalic>
<IsUnderline>False</IsUnderline>
<FontBrush>
<SolidColorBrush>
<Color A="1" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</FontBrush>
</FontInfo>
</TextSpan>
</LineTextSpan>
<LineTextSpan>
<TextSpan>
<Text>Atlanta, GA 30328</Text>
<FontInfo>
<FontName>Segoe UI</FontName>
<FontSize>8.8</FontSize>
<IsBold>False</IsBold>
<IsItalic>False</IsItalic>
<IsUnderline>False</IsUnderline>
<FontBrush>
<SolidColorBrush>
<Color A="1" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</FontBrush>
</FontInfo>
</TextSpan>
</LineTextSpan>
</FormattedText>
<BarcodePosition>None</BarcodePosition>
<ObjectLayout>
<DYMOPoint>
<X>1.0325</X>
<Y>0.2958333</Y>
</DYMOPoint>
<Size>
<Width>1.605</Width>
<Height>0.4983333</Height>
</Size>
</ObjectLayout>
</AddressObject>
</LabelObjects>
</DynamicLayoutManager>
</DYMOLabel>
<LabelApplication>Blank</LabelApplication>
<DataTable>
<Columns></Columns>
<Rows></Rows>
</DataTable>
</DesktopLabel>
This library makes label printing possible for my team's app. So thanks!
I'm wondering: Could we reduce the size of the library?
The last SDK available on developers.dymo.com (http://labelwriter.com/software/dls/sdk/js/DYMO.Label.Framework.3.0.js) was 103kb.
The current version of dymo.connect.framework.js
in this repo is 462kb.
I don't know the differences to fully appreciate why the change. But I'm seeing stuff in the version here that's defined but unused. For a quick few examples, in the goog.string
namespace are the unused helpers toTitleCase
, toSelectorCase
, and toTitleCase
.
Perhaps it could be converted to an ES Module, for instance, so folks could tree-shake out the parts they don't use?
I'd love to help with this effort. But it's been really difficult to do from the published version.
If my just-opened #22 happens, I'll be ready to jump in! I'll bet others would, too.
Thanks!
Since the latest update of Chrome, if we load the dymo.framework.full.js script, the page freezes.
It seems like there's an issue with the Web Service connection.
Please see here the workaround that some people provided:
https://support.inventorylab.com/hc/en-us/articles/115004970613-DYMO-Not-Working-With-Chrome-Update-Solution
Hi there.
I can see the label.isDCDLabel()
and label.isDLSLabel()
functions are available to use to validate if the labels will work with the chosen piece of software, but is there a way to see which of the programs is installed?
Or is that covered in the dymo.label.framework.checkEnvironment()
function?
Can you fix this issue? This was brought over from the older library.
The issue is in ajaxSync using archaic methods to fetch remote data. This causes the browser to hang/freeze during this process.
What is the status on making this compatible with the new 550 printers?
Today we found a serious issue with Dymo Connect templates.
They can cause a freeze with eventually a crash.
This happens in the following situation:
What happens is this:
Uncaught InternalError: allocation size overflow
_getAddressObjectText
Can this please be investigated and fixed?
Thanks!
I found this in your source code on line 36730 and 37021
https://github.com/dymosoftware/dymo-connect-framework/blob/master/dymo.connect.framework.full.js#L36730
That looks like a strong desire for trouble in 2022. What are you using it for?
Have you had any discussion on removing the Google Closure Javscript Library and go dependancy free instead? You might not need all that extras and maybe could rely solely on the builtin XML Parser in JavaScript? https://www.w3schools.com/xml/xml_parser.asp
You might be surprised how much more effective you could be with less code to maintain.
Printing PDF417 codes from the .NET Sample produces invalid PDF417 codes (both in preview and in actual print result).
Info:
DCD 1.3.1 on Windows 10 1909 x64
Visual Studio 2019
DYMO.Connect.SDK 1.3.1.115
Installation steps followed from WPFSDKSample
Steps to reproduce:
3F21C736502C8A39
)Example of preview of code 3F21C736502C8A39
Example of valid code from interface of DCD1.3.1 of code 3F21C736502C8A39
We're using the JavaScript SDK to print a custom label from our web application to a Dymo LabelWriter Wireless printer. This works as expected from a desktop browser (Windows and MacOS) but we're unable to print from iOS (iPad). Is this possible using the JavaScript SDK?
Thanks,
Matt
Hello, We use a DYMO 450 printer to print text in Hebrew.
What is special about Hebrew is that the writing is from RIGHT to LEFT.
In DLS software we had no problem writing text in Hebrew fluently.
In DCD software there is a reversal of the order of the letters as soon as they leave the text box.
For example:
The word SHALOM in Hebrew is written: "שלום". In practice, after removing the cursor from the text box. The text is flipped over and appears "םולש".
It's like "olleH" instead of "Hello".
Now ... what's interesting is that in version 1.2 of the DCD the matter was addressed and the text was not reversed. But this was only true for version 1.2. Now in the advanced versions of DCD it is no longer possible to write in Hebrew -( text from right to left).
My question is: is there an approach and possibility to change anything in the settings of the Text Box flow-direction
?
(I know that in DLS - there was access to the "user.config" file where the settings could be changed - is there anything similar to DCD?)
Hi.
dymo framework did not work check connection status with web service after initialize framework.
so I'm using a jquery getScripts library for dynamically load/unload dymo framework.
previoulsy version dymo.label.framework can handle this, dymo.connect.framework return error message when already framework loaded.
"Namespace "goog.debug.Error" already declared."
How can I unload or clear already bind framework?
I tried simply window.dymo = null; window.goog = null did not work
Hello all,
After extensive testing the observation is the following:
The moment that the current Dymo printer driver in the application is addressed the application crashes without any logging / just in time debugging / crash information.
Is it possible to run both libraries simultanious?
is the SDK functioning with obfuscated binaries?
Why is it that an app can crash with no references in the source code to the DYMO.Connect.SDK only by installing the nuget package?
Any suggestions?
I noticed this while opening an 8.7.x label or connect label in the connect 1.3.2 framework using JavaScript. I was testing for a 450 Twin Turbo LabelWriter. I believe that the regular expression used during retrieval of the label XML is incorrect as the XML comes back invalid. This was actually causing me a CORS error during printing.
var label = dymo.label.framework.openLabelFile(labelFileName);
var labelXml = label.getLabelXml();
The problem occurs here:
dymo.xml.serialize = function(node)
{
function fix (node) {
return node.replaceAll(/<Color (.+)\/>/g, "<Color $1> </Color>");
}
return fix(goog.dom.xml.serialize(node));
};
If the regular expression is changed so that it will now stop at the end of the tag and it is no longer eager, the sample code works:
return node.replaceAll(/<Color ([^>]+?)\/>/g, "<Color $1> </Color>");
To test this, simply create an eclipse / circle shape on the label. Here is the label XML that was causing me problems:
<?xml version="1.0" encoding="utf-8"?>
<DesktopLabel Version="1">
<DYMOLabel Version="3">
<Description>DYMO Label</Description>
<Orientation>Portrait</Orientation>
<LabelName>30270 Continuous</LabelName>
<InitialLength>1</InitialLength>
<BorderStyle>SolidLine</BorderStyle>
<DYMORect>
<DYMOPoint>
<X>0.1173611</X>
<Y>0.3708333</Y>
</DYMOPoint>
<Size>
<Width>2.205555</Width>
<Height>0.5</Height>
</Size>
</DYMORect>
<BorderColor>
<SolidColorBrush>
<Color A="1" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</BorderColor>
<BorderThickness>0</BorderThickness>
<Show_Border>False</Show_Border>
<ContinuousLayoutManager>
<RotationBehavior>ClearObjects</RotationBehavior>
<LabelObjects>
<ShapeObject>
<Name>SHAPE</Name>
<Brushes>
<BackgroundBrush>
<SolidColorBrush>
<Color A="0" R="1" G="1" B="1"></Color>
</SolidColorBrush>
</BackgroundBrush>
<BorderBrush>
<SolidColorBrush>
<Color A="1" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</BorderBrush>
<StrokeBrush>
<SolidColorBrush>
<Color A="1" R="0" G="0" B="0"></Color>
</SolidColorBrush>
</StrokeBrush>
<FillBrush>
<SolidColorBrush>
<Color A="0" R="1" G="1" B="1"></Color>
</SolidColorBrush>
</FillBrush>
</Brushes>
<Rotation>Rotation0</Rotation>
<OutlineThickness>1</OutlineThickness>
<IsOutlined>False</IsOutlined>
<BorderStyle>SolidLine</BorderStyle>
<Margin>
<DYMOThickness Left="0" Top="0" Right="0" Bottom="0" />
</Margin>
<StrokeWidth>1</StrokeWidth>
<DashPattern>SolidLine</DashPattern>
<ShapeType>Ellipse</ShapeType>
<ObjectLayout>
<DYMOPoint>
<X>0.1173611</X>
<Y>0.3708333</Y>
</DYMOPoint>
<Size>
<Width>2.205555</Width>
<Height>0.5</Height>
</Size>
</ObjectLayout>
</ShapeObject>
</LabelObjects>
</ContinuousLayoutManager>
</DYMOLabel>
<LabelApplication>Blank</LabelApplication>
<DataTable>
<Columns></Columns>
<Rows></Rows>
</DataTable>
</DesktopLabel>
Sending an empty string to a barcode value using recordset causes the dymo connect webservice to shut down and disappear. Needs to be relaunched manually.
We don't always know if a control is a barcode type or not. We may want to just display the numbers in some cases, so defaulting to "0" isn't ideal, but acceptable.
However, it would be better if we could hide the barcode from printing at all if we don't have a value to give it. I think that is what Dymo label Webservice used to do.
When dymo.label.framework.init();
is called from Firefox, it is getting the CORS error below, which prevents label printing.
Firefox 89.0 (64-bit)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://127.0.0.1:41960/DYMO/DLS/Printing/StatusConnected. (Reason: CORS request did not succeed).
I'm having an issue with the DYMO Connect Service on Windows when trying to render labels created with the new DYMO Connect Software (v1.3.2.14). The DYMO Connect Service throws a 500 error with the following error message: Element
is an invalid XmlNodeType.
I'm using the javascript DYMO Connect framework and have also installed the DCD service correctly (see screenshots). I've also validated the label xml with the isValidLabel method and this returns true, so don't know why the service itself fails...
You can find a demo project to test this issue here:
https://cheqroom-cdn.s3-us-west-2.amazonaws.com/dymo-demo/VisitorManagement.html
(if you check in the network tab, you will immediately see a 500 error on the RenderLabel request)
I've yet to find a good example of using a LabelSet for this SDK.
With old dymo labelwriter the response of getPrinters()
was correct.
With new Dymo connect (actually 1.4.2.82), printers are always offline.
idk if its more related to this framework of to a wrong dymo connect response.
Tried on different pcs (both win10 and 11)
getPrinters() response with a dymo connected to pc and visible on dymo connect ===>>
<Printers>
<LabelWriterPrinter>
<Name>DYMO LabelWriter 450 Turbo</Name>
<ModelName>DYMO LabelWriter 450 Turbo</ModelName>
<IsConnected>False</IsConnected> // << but its online in windows settings and dymo connect
<IsLocal>True</IsLocal>
<IsTwinTurbo>False</IsTwinTurbo>
</LabelWriterPrinter>
</Printers>
Its reproducible also on samples via devtools with
dymo.label.framework.getPrinters()
When attempting to build a simple .NET core console app and after adding the latest Nuget package for DYMO.Connect.SDK v1.3.1.115
the runtime error depicted below is thrown on load.
Given that the requirements on the Nuget package show .net standard 2, it seemed likely that it would run on .net core. Is this error expected or is it a product bug or a misconfig on my part?
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'DYMO.CrossPlatform.Common, Version=1.3.1.115, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'DYMO.CrossPlatform.Common, Version=1.3.1.115, Culture=neutral, PublicKeyToken=null'
at DymoPrintServerCore.DymoPrintServer..ctor()
at DymoPrintServerCore.Program.Main(String[] args) in C:\Data\Source\QuickTools\DymoPrintServerCore\Program.cs:line 9
Hey! Do you have a public SDK for Android? I'd like to write my own personalised app for printing.
Hi all,
We are in the process of moving from the Dymo.Framework to DymoSdk. Most of the driver development is done whereas actually sending the printjob throws an assembly error.
{"Could not load file or assembly 'SkiaSharp.Views.Desktop, Version=1.68.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.":"SkiaSharp.Views.Desktop, Version=1.68.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"}
The SkiaSharp Nuget package is installed and we are unable to find a reason why it throws an exception.
What do we miss?
I found a critical bug.
The DCM software saves a *.dymo label with a Byte Order Mark (BOM). When passing the contents of the .dymo file to dymo.label.framework.openLabelXml() it fails to decode the XML saying it's invalid. Removing the byte order mark solves the problem.
Byte Order Mark is generally a bad approach. Here are your alternatives for a fix:
A) Either implement support for BOM in the DYMO Framework.
B) Or stop inserting the byte order mark when using the DCD software.
Regex for matching the BOM /^\ufeff/
This bug makes any labels created with the DCD Software invalid for use with the DYMO Framework.
It seems that due to issues related to Closure compiler google/closure-compiler#1704
dymo.connect.framework.js cannot be loaded as Chrome part of Chrome Extension.
Could not load file 'dymo.connect.framework.js' for content script. It isn't UTF-8 encoded.
I did check file itself and it is utf-8 encoded.
Maybe it can be compiled with
:closure-output-charset "US-ASCII"
as a workaround?
I have the following problem and have already tried quite a few:
A CODE128Auto Label D1 barcode is to be printed with the PNP. When printing, a part of the barcode is not printed at the front and back.
Tested are now:
Dymo JS Framework integrated from the Github, label created with Connect.
The printout by the Connect software is also positive.
Hi,
Is it possible to print a PDF file on a Dymo 4XL using the framework?
Doc only mentions XML file.
Thank you!
Hello, we've been using the SDK now to print for almost 2 years without issue. We currently have Dymo 450s that we print to. Recently we bought a Dymo 550 to use at one of our workstations, and to our surprise any barcode printed by the SDK comes out as solid black for us. The same code works perfectly for Dymo 450s.
Has anyone else experienced this issue?
Image and code below.
const printLabel = barcodeData => {
var labelXml =
'<?xml version="1.0" encoding="utf-8"?>\
<DieCutLabel Version="8.0" Units="twips">\
<PaperOrientation>Landscape</PaperOrientation>\
<Id>Address</Id>\
<PaperName>30252 Address</PaperName>\
<DrawCommands>\
<RoundRectangle X="0" Y="0" Width="1581" Height="5040" Rx="270" Ry="270" />\
</DrawCommands>\
<ObjectInfo>\
<BarcodeObject>\
<Name>ItemCode</Name>\
<ForeColor Alpha="255" Red="0" Green="0" Blue="0" />\
<BackColor Alpha="0" Red="255" Green="255" Blue="255" />\
<LinkedObjectName></LinkedObjectName>\
<Rotation>Rotation0</Rotation>\
<IsMirrored>False</IsMirrored>\
<IsVariable>True</IsVariable>\
<Text>1234</Text>\
<Type>Code128Auto</Type>\
<Size>Large</Size>\
<TextPosition>Bottom</TextPosition>\
<TextFont Family="Arial" Size="5" Bold="False" Italic="False" Underline="False" Strikeout="False" />\
<CheckSumFont Family="Arial" Size="7.3125" Bold="False" Italic="False" Underline="False" Strikeout="False" />\
<TextEmbedding>None</TextEmbedding>\
<ECLevel>0</ECLevel>\
<HorizontalAlignment>Center</HorizontalAlignment>\
<QuietZonesPadding Left="0" Top="0" Right="0" Bottom="0" />\
</BarcodeObject>\
<Bounds X="331" Y="680.31494140625" Width="4622" Height="765.708679199219" />\
</ObjectInfo>\
<ObjectInfo>\
<TextObject>\
<Name>Description</Name>\
<ForeColor Alpha="255" Red="0" Green="0" Blue="0" />\
<BackColor Alpha="0" Red="255" Green="255" Blue="255" />\
<LinkedObjectName></LinkedObjectName>\
<Rotation>Rotation0</Rotation>\
<IsMirrored>False</IsMirrored>\
<IsVariable>True</IsVariable>\
<HorizontalAlignment>Center</HorizontalAlignment>\
<VerticalAlignment>Top</VerticalAlignment>\
<TextFitMode>ShrinkToFit</TextFitMode>\
<UseFullFontHeight>True</UseFullFontHeight>\
<Verticalized>False</Verticalized>\
<StyledText>\
<Element>\
<String>ItemDescription</String>\
<Attributes>\
<Font Family="Arial" Size="12" Bold="True" Italic="False" Underline="False" Strikeout="False" />\
<ForeColor Alpha="255" Red="0" Green="0" Blue="0" />\
</Attributes>\
</Element>\
</StyledText>\
</TextObject>\
<Bounds X="331" Y="163" Width="4622" Height="341.566925048828" />\
</ObjectInfo>\
</DieCutLabel>';
const label = dymo.label.framework.openLabelXml(labelXml);
label.setObjectText("Description", barcodeData.description);
label.setObjectText("ItemCode", barcodeData.barcode);
const printers = dymo.label.framework.getPrinters();
if (printers.length == 0)
throw "No DYMO printers are installed. Install DYMO printers.";
let printerName = "";
for (var i = 0; i < printers.length; ++i) {
var printer = printers[i];
console.log(printer);
if (printer.printerType == "LabelWriterPrinter") {
printerName = printer.name;
break;
}
}
label.print(printerName);
};
export { printLabel };
If I simply run the JavaScript demos untouched I get CORS errors from Chrome.
dymo.connect.framework.js:2 Access to XMLHttpRequest at 'https://127.0.0.1:41951/DYMO/DLS/Printing/RenderLabel' from origin 'https://XXXXX.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I've done that so that everything is predictable and we can add timeouts to API calls and have better control over the code.
I've already broken out the 41,000 line js into separate code and using node packages when possible. I was able to remove all the XHR and goog stuff which simplifies a ton. I've also tried fixing as many spelling mistakes as possible.
http://labelwriter.com/software/dls/sdk/js/dymo.connect.framework.js
Anyone know where to find this now?
Hello developer team,
would it be possible to read out the serial number or a unique identifier of the printer using the JS Framework?
Thus different labels could be inserted in 2 or 3 printers. The correct printer is activated using the serial number.
When using the label.render
or label.print
methods, or in general when using the label.getLabelXml
method to get the XML for a label, or after doing any DOM operation on the XML and using any serializer, and using it together with dymo.label.framework.printLabel
, the DYMO Connect Service will responds with a 500 error:
{"message":"An error has occurred.","exceptionMessage":"'Element' ist ein ungültiger XmlNodeType. Zeile 22, Position 4.","exceptionType":"System.Xml.XmlException","stackTrace":"
bei System.Xml.XmlReader.ReadEndElement()
bei DYMO.LabelAPI.DYMOLabel`1.Deserialize(XmlReader reader)
bei DYMO.CrossPlatform.Common.Helpers.SerializationHelper.Deserialize[T](XmlReader reader)
bei DYMO.LabelAPI.LabelHelper.ReadAndOpenLabel(XmlReader reader)
bei DYMO.LabelAPI.LabelHelper.OpenLabel(XmlReader reader)
bei DymoSDK.Implementations.DymoLabel.LoadLabelFromXML(String xmlContent)
bei DYMOWebApi.Windows.Controllers.DymoDLSSDKController.RenderLabel(FormDataCollection formDataCollection)
bei lambda_method(Closure , Object , Object[] )
bei System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)
bei System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
bei System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"}: Internal Server Error
at ajaxSync (dymo.connect.framework.js?1614357232:2)
at invokeWsCommand (dymo.connect.framework.js?1614357232:2)
at DlsWebService.renderLabel (dymo.connect.framework.js?1614357232:2)
at Object.renderLabel (dymo.connect.framework.js?1614357232:2)
at Object.dymo.label.framework.renderLabel (dymo.connect.framework.js?1614357232:2)
at previewLabel (dlem.js?1614711352:1005)
Feeding the XML sent in the request to the DYMO Connect Service into the DYMO Connect desktop application, this crashes, too!
The issue appears to be due to the empty element shorthand when used for specific elements:
<Color .... />
cannot be digested, it must be <Color ...></Color>
And in <DataTable>
,
<Columns />
must be <Columns></Columns>
and
<Rows />
must be <Rows></Rows>
Interestingly, the empty element shorthand syntax is acceptable for DYMOThickness
in Margin
.
Thus, in order to get DCD labels working, I needed to "fix" the XML before passing it to the renderLabel/printLabel functions.
label.print()
and label.render()
are not fixable this way. YOU need to do that in the framework (it would not hurt though to update the desktop app and print service to better handle XML parsing, and maybe not to crash but handle errors more graceful).
This cost me a lot of time :(
When declaring which side to print from If a computer has the Dymo connect software (DCD) installed it prints from the right side regardless of printer properties. Works fine if printing from a computer using Dymo Label (DLS).
Relevant snippets of code that prints on the right side only with DCD:
var label = dymo.label.framework.openLabelXml(labelXml);
var printParams= {};
printParams.twinTurboRoll = dymo.label.framework.TwinTurboRoll.Left;
// 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 "No DYMO printers are installed or the webservice is not running";
var printerName = "";
for (var i = 0; i < printers.length; ++i)
{
var printer = printers[i];
if (printer.printerType == "LabelWriterPrinter")
{
printerName = printer.name;
break;
}
}
if (printerName == "")
throw "No LabelWriter printers found. Install LabelWriter printer";
// finally print the label
label.print(printerName, dymo.label.framework.createLabelWriterPrintParamsXml(printParams));
Is there an option on Dymo Connect Software to prevent its opening each time a USB from a printer is plugged to the PC?
We use our software to generate PDF labels for a Dymo 4XL and a 450, the Dymo service is always running by default, there is no need to open Dymo Connect each time we plug a printer to the PC.
Is there a way to disable it? Or can it be implemented?
Thanks
Running the PreviewAndPrintLabel sample code in github, forcing the load of the .dymo or .label file results in the following 500 exceptions from https://127.0.0.1:41951/DYMO/DLS/Printing/RenderLabel
I'm using Dymo Connect 8.7.3
Here's the full error. See the sample application to repro issue.
VM172:1 POST https://127.0.0.1:41951/DYMO/DLS/Printing/RenderLabel 500
(anonymous) @ VM172:1
ajaxSync @ dymo.connect.framework.js:2
invokeWsCommand @ dymo.connect.framework.js:2
DlsWebService.renderLabel @ dymo.connect.framework.js:2
renderLabel @ dymo.connect.framework.js:2
dymo.label.framework.renderLabel @ dymo.connect.framework.js:2
dymo.label.framework.Label.render @ dymo.connect.framework.js:2
updatePreview @ PreviewAndPrintLabel.js:46
(anonymous) @ PreviewAndPrintLabel.js:114
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
l @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
S.<computed> @ jquery.min.js:2
labelFile.onchange @ PreviewAndPrintLabel.js:103
dymo.connect.framework.js:2 Uncaught Error: {"message"
{"message":"An error has occurred.","exceptionMessage":"ReadElementContentAs() methods cannot be called on an element that has child elements. Line 3, position 6.","exceptionType":"System.Xml.XmlException","stackTrace":" at System.Xml.XsdValidatingReader.InternalReadElementContentAsObject(XmlSchemaType& xmlType, Boolean unwrapTypedValue, String& originalString)\r\n at System.Xml.XsdValidatingReader.ReadElementContentAsString()\r\n at DYMO.LabelAPI.DYMOLabel`1.Deserialize(XmlReader reader)\r\n at DYMO.CrossPlatform.Common.Helpers.SerializationHelper.Deserialize[T](XmlReader reader)\r\n at DYMO.LabelAPI.LabelHelper.ReadAndOpenLabel(XmlReader reader)\r\n at DYMO.LabelAPI.LabelHelper.OpenLabel(XmlReader reader)\r\n at DymoSDK.Implementations.DymoLabel.LoadLabelFromXML(String xmlContent)\r\n at DYMOWebApi.Windows.Controllers.DymoDLSSDKController.RenderLabel(FormDataCollection formDataCollection)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"}:
at ajaxSync (dymo.connect.framework.js:2)
at invokeWsCommand (dymo.connect.framework.js:2)
at DlsWebService.renderLabel (dymo.connect.framework.js:2)
at Object.renderLabel (dymo.connect.framework.js:2)
at Object.dymo.label.framework.renderLabel (dymo.connect.framework.js:2)
at dymo.label.framework.Label.render (dymo.connect.framework.js:2)
at updatePreview (PreviewAndPrintLabel.js:46)
at Object.success (PreviewAndPrintLabel.js:114)
at c (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
When creating a LabelSetBuilder of many labels (50+) that also print barcodes (so printing is not fast), calling printAsync
seems to time out quickly (10 seconds?) and give an error: "Failed to Execute WebService: printAsync, Error: -1"
However, printing continues until all labels are printed. The webservice appears to be working fine, but the javascript connecting to it gives up too quickly. The default timeout should probably be increased for a large number of labels, or allow us to specify a timeout value.
This occurs with the new library or the older DYMO.label library, as well as with either the older DymoLabel WebService or the newest DYMO Connect WebService.
I attempted to also use print2Async, which seems to print faster but still has the exact same issue.
EDIT: Enabling Print Spooling on the printer appears to resolve the problem. DYMO printers seem to be installed by default with Spooling disabled? Also, I found the global (!) variable in the dymo library that can be set to change the timeout: WS_COMMAND_TIMEOUT
Suddenly on a lot of computers where DYMO Connects GetPrinters Endpoint gets called results in canceled requests (all run about 11 seconds). I think the root of this problem is the sudden performance change when calling the GetPrinters. endpoint. The request itself seems to work as if I run it manually it works even though it got really slow (14-18 seconds) as you can see in the image below.
Some other notes:
Although i see here that there is backward compatibility and the functions names are the same, i have found that some users cannot use my website (here) with the old Dymo web service running (the one that comes with Dymo Label v8). Installation of the Dymo CONNECT web service fixes the problem, but is there any way to make use of the old web service or the new depending on what the users have installed?
I have "upgraded" to Dymo Connect Framework for Javascript (coming from Dymo Label Framework) but using the LabelSetBuilder to change an image in the label doesn't work.
let dymoLabel = dymo.label.framework.openLabelXml(labelXml);
let labelSetBuilder = new dymo.label.framework.LabelSetBuilder();
// for multiple labels I need to change text and a photo, so next part is in a loop to change labelImageBase64 and labelText
let labelRecord = labelSetBuilder.addRecord();
labelRecord.setBase64Image('PHOTO', labelImageBase64));
labelRecord.setText('TEXT', labelText);
dymoLabel.print(printersSelect.val(), '', labelSetBuilder.toString());
For one label I can just change the label ietself with the setters, but printing will be slow because then there are multiple print calls instead of one.
In the old system it did work and the documentation is not clear...
Just wondering if you could add a License, such as the MIT license, to this repo, so that any potential copyright issues are avoided from using this software.
https://help.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository
Hi there!, im using dymo framework for first time, im using the dymo connect software to create the label, the problem here its is i cannot use the method render or print of the ILabel object that i get of using openLabelXml, i check is a valid label, and i get true, this is the error i get:
I check the label and it opens in the dymo connect, i dont think the label has a problem, so i decide to use the renderLabel method, and it get render, but when i set text on a textObject, it change it, but when i render again, the label it have the same text before the set, and when i try to print it the same error pops.
I try with a label of the other software (the dls version) and it works fine with ILabel methods, so i dont know if im doing it wrong, or is it an error on the framework. Thank you!
I am attempting to update from DLS to DYMO Connect 1.3.2.18. I am getting an exception Could not load file or assembly 'DYMOPrinting.dll' or one of its dependencies. The specified module could not be found.
I can confirm that there is a DYMOPrinting.dll and DYMOPrinting_x64.dll in C:\Program Files (x86)\DYMO\DYMO Connect. I was not able to find the download from the "DYMO Connect Software" link in the README, so I may have downloaded an older version of DYMO connect. I downloaded 1.3.2.18 using the link on https://www.dymo.com/en_US/online-support-compatibility-chart (https://download.dymo.com/dymo/Software/DCDSetup1.3.2.18.exe).
{"message":"An error has occurred.","exceptionMessage":"The type initializer for 'DYMO.LabelAPI.Windows.Printers.DYMOPrinting' threw an exception.","exceptionType":"System.TypeInitializationException","stackTrace":" at DYMO.LabelAPI.Windows.Printers.DYMOPrinting.EndPrintJob()
at DYMO.LabelAPI.Windows.BasePrintDecorator.Print(BaseLegacyPrinterCommunication communication, IEnumerable`1 labels, PrintParameters printParam, IResolution resolution)
at DYMO.LabelAPI.BaseLegacyPrinterCommunication.Print(IEnumerable`1 labels, PrintParameters printParam, IResolution resolution)
at DYMO.LabelAPI.Printer.Print(IEnumerable`1 labels, PrintParameters printParams)
at DymoSDK.Implementations.DymoPrinter.PrintLabel(IEnumerable`1 labels, String printerName, Int32 copies, Boolean collate, Boolean mirror, Int32 rollSelected, Boolean chainMarks, Boolean barcodeGraphsQuality)
at DYMOWebApi.Windows.Controllers.DymoDLSSDKController.PrintLabel(FormDataCollection formDataCollection)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()","innerException":{"message":"An error has occurred.","exceptionMessage":"Could not load file or assembly 'DYMOPrinting.dll' or one of its dependencies. The specified module could not be found.","exceptionType":"System.IO.FileNotFoundException","stackTrace":" at DYMO.LabelAPI.Windows.Printers.DYMOPrinting..cctor()"}}
Hello,
Just installed Windows 11 preview and Dymo 450 and Dymo 4XL shows as connected but when printing something it says error in the printing queue dialog of windows plus a notification.
The printers appears as connected in Dymo Connect too.
It appears that the DYMO Connect Web Service is not compatible with Google's new PNA preflight request initiative (https://developer.chrome.com/blog/private-network-access-preflight/).
As such the ability to print via the DYMO Connect Framework will stop working when Chrome v101 is released in April 2022 since response headers from the DYMO Connect Web Service do not include the "Access-Control-Allow-Private-Network: true" header as required.
Are there any plans or ongoing efforts to update the DYMO Connect Web Service to be compatible with PNA preflight requests?
Thanks
The most recent update has caused all of our systems to go down. Is anyone else having issues?
When loading this framework. I get "Namespace "goog.debug.Error" already declared."
When printing labels created with Dymo Label, for fields that are set as "Shrink to Fit", Dymo Connect prints them in a maximum size font, which cuts off the text.
Here is the object info. It is supposed to shrink the text to fit the bounds, but it simply does not.
<ObjectInfo>
<TextObject>
<Name>Set Name</Name>
<ForeColor Alpha="255" Red="0" Green="0" Blue="0" />
<BackColor Alpha="0" Red="255" Green="255" Blue="255" />
<LinkedObjectName />
<Rotation>Rotation0</Rotation>
<IsMirrored>False</IsMirrored>
<IsVariable>False</IsVariable>
<GroupID>-1</GroupID>
<IsOutlined>False</IsOutlined>
<HorizontalAlignment>Center</HorizontalAlignment>
<VerticalAlignment>Middle</VerticalAlignment>
<TextFitMode>ShrinkToFit</TextFitMode>
<UseFullFontHeight>True</UseFullFontHeight>
<Verticalized>False</Verticalized>
<StyledText>
<Element>
<String xml:space="preserve">MTG Set Name</String>
<Attributes>
<Font Family="Arial" Size="48" Bold="True" Italic="False" Underline="False" Strikeout="False" />
<ForeColor Alpha="255" Red="0" Green="0" Blue="0" HueScale="100" />
</Attributes>
</Element>
</StyledText>
</TextObject>
<Bounds X="223" Y="929" Width="2795" Height="784" />
</ObjectInfo>
Reverting to the Dymo Label web service, this label appears correct. Using Dymo.WinApi.Win.Host.exe vs 1.3.2 it is unusable.
Could the original source behind dymo.connect.framework.js
be published to this repo?
I'm thinking of the pre-Closure Compiler version.
It would make it much easier for folks like me to contribute back to the project, for instance, by removing unused code, creating an ES modules version, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.