Skip to content

Instantly share code, notes, and snippets.

@rukeba
Created June 15, 2020 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rukeba/2bc32fa4ae0c538739cbb578dfa37bab to your computer and use it in GitHub Desktop.
Save rukeba/2bc32fa4ae0c538739cbb578dfa37bab to your computer and use it in GitHub Desktop.
// check driver status:
// https://localhost:41951/DYMO/DLS/Printing/StatusConnected
// https://127.0.0.1:41951/DYMO/DLS/Printing/StatusConnected
// list connected printers:
// https://localhost:41951/DYMO/DLS/Printing/GetPrinters
// https://127.0.0.1:41951/DYMO/DLS/Printing/GetPrinters
var labelXml = `
<DieCutLabel Version="8.0" Units="twips">
<PaperOrientation>Landscape</PaperOrientation>
<Id>Address</Id>
<PaperName>30252 Address</PaperName>
<DrawCommands/>
<ObjectInfo>
<TextObject>
<Name>Text</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>Left</HorizontalAlignment>
<VerticalAlignment>Middle</VerticalAlignment>
<TextFitMode>ShrinkToFit</TextFitMode>
<UseFullFontHeight>True</UseFullFontHeight>
<Verticalized>False</Verticalized>
<StyledText/>
</TextObject>
<Bounds X="332" Y="150" Width="4455" Height="1260" />
</ObjectInfo>
</DieCutLabel>`;
var label = dymo.label.framework.openLabelXml(labelXml);
// and print:
label.print('DYMO LabelWriter 450');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment