Closed atvvarna closed 8 years ago
Hi,
I've got the error when trying the sample.
What error you get ?
http://localhost/dymo.php?/DYMO/DLS/Printing/StatusConnected http://yourip/dymo.php?/DYMO/DLS/Printing/StatusConnected
These two links you return true ?
Hi, yes both are true. Also dymo.php?/DYMO/DLS/Printing/Check return Congratulations
But if you test this :
dymo.label.framework.init('http://yourip/dymo.php?', function(){
var printers = dymo.label.framework.getPrinters();
if (printers.length == 0)
throw "No DYMO printers are installed. Install DYMO printers.";
});
you get throw error "No DYMO ..." ?
Yes, I just tried in Firefox but same error.
Uhm, strange.
Do you use right adress in init ? Can you look in your Chrome/Firefox "Console error" and "Network status" ?
Yes everything is fine there also if I execute: dymo.php?/DYMO/DLS/Printing/GetPrinters
"DYMO LabelWriter 450 Twin Turbo<\/Name>DYMO LabelWriter 450 Twin Turbo<\/ModelName>True<\/IsConnected>True<\/IsLocal>True<\/IsTwinTurbo><\/LabelWriterPrinter><\/Printers>"
Also from https://localhost:41951/DYMO/DLS/Printing/GetPrinters everything is fine too:
"
Do you uses my script https://github.com/flavienliger/DymoWebservice/blob/master/client/DYMO.Label.Framework.2.0.2_edited.js ?
Because in your Network status, only http://yourip/dymo.php?... should appear.
Yes, I just change line 3104 to true as "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end"
Now I just copy paste all code again and don't see any error but nothing printed.
haha found the problem now, first it was the silly from me tat set it to true then it was the label that it's not supported by Dymo 450 twin trubo. Thank you man you are the best! Do you know where I can get the labelXml for different labels? for example 11354 and 11352?
Ahhh, well done :).
Yes, use DymoPrinter software, and save your preset label. After edit file and you get xml code.
Got it :+1: Do you know any way to print many labels at once?
About the multiple labels in one print job I've figure it out, pretty easy: var labelSet = new dymo.label.framework.LabelSetBuilder();
//set records var record = labelSet.addRecord(); record.setText("TEXT", YOUR_VARIABLE); var record = labelSet.addRecord(); record.setText("TEXT", YOUR_VARIABLE);
//print it label.print(printerName, '', labelSet);
More info here: http://developers.dymo.com/2010/06/17/dymo-label-framework-javascript-library-print-multiple-labels/
Hello, I've got the error when trying the sample. It's strange that in http://labelwriter.com/software/dls/sdk/samples/js/PreviewAndPrintLabel/PreviewAndPrintLabel.html I can see my printer but still unable to print. Any help will be appreciated.
Regards, Alex