Created
June 15, 2020 06:46
-
-
Save rukeba/2bc32fa4ae0c538739cbb578dfa37bab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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