All Projects → dsandor → Dymojs

dsandor / Dymojs

A pure javascript library for printing labels on a Dymo Labelwriter printer from the browser or from nodejs.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Dymojs

Glabels Qt
gLabels Label Designer (Qt/C++)
Stars: ✭ 116 (+30.34%)
Mutual labels:  printing, labels
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+1225.84%)
Mutual labels:  labels
Ottocyclelabel
循环滚动的label控件
Stars: ✭ 12 (-86.52%)
Mutual labels:  labels
Wikibase Edit
a lib to edit Wikibase from NodeJS
Stars: ✭ 48 (-46.07%)
Mutual labels:  labels
Tree printer
A Java class for printing binary trees as ASCII text
Stars: ✭ 20 (-77.53%)
Mutual labels:  printing
Stf Vue Select
stf vue select - most flexible and customized select
Stars: ✭ 61 (-31.46%)
Mutual labels:  labels
Whattodo
A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates
Stars: ✭ 817 (+817.98%)
Mutual labels:  labels
Cups
Apple CUPS Sources
Stars: ✭ 1,223 (+1274.16%)
Mutual labels:  printing
Gmailctl
Declarative configuration for Gmail filters
Stars: ✭ 1,171 (+1215.73%)
Mutual labels:  labels
Labelled
Manipulating labelled vectors in R
Stars: ✭ 45 (-49.44%)
Mutual labels:  labels
Gitwar
🚀 Gitwar - Compete with Github
Stars: ✭ 44 (-50.56%)
Mutual labels:  labels
Snaptools
Tools to integrate the macOS window environment and command line interface
Stars: ✭ 32 (-64.04%)
Mutual labels:  labels
Expss
expss: Tables and Labels in R
Stars: ✭ 65 (-26.97%)
Mutual labels:  labels
Mapbox Gl Print Export For Port
Print/Export for Mapbox GL
Stars: ✭ 14 (-84.27%)
Mutual labels:  printing
Jsprintmanager
Advanced Client-side Printing & Scanning Solution for Javascript
Stars: ✭ 74 (-16.85%)
Mutual labels:  labels
Printthis
jQuery printing plugin; print specific elements on a page
Stars: ✭ 902 (+913.48%)
Mutual labels:  printing
Go Ipp
Pure Go IPP library
Stars: ✭ 40 (-55.06%)
Mutual labels:  printing
Pyescpos
Support for Epson ESC/POS printer command system.
Stars: ✭ 52 (-41.57%)
Mutual labels:  printing
Simplewpfreporting
Reporting in WPF (XAML) made easy
Stars: ✭ 87 (-2.25%)
Mutual labels:  printing
Labeler
Manage labels on GitHub as code
Stars: ✭ 78 (-12.36%)
Mutual labels:  labels

dymojs

Build Status

Wicked simple pure javascript cross platform Dymo Labewriter printing module for Node.js with no platform dependencies.

This module works on Mac, Linux, and Windows.

  • no gyp build needed
  • no Microsoft Visual Studio needed.
  • no gcc or c++ build needed

install

yarn add dymojs

or if you are stuck in the old school

npm i dymojs

usage

const Dymo = require('dymojs'),
	   dymo = new Dymo();

dymo.print('DYMO LabelWriter 450', labelXml);

render a label preview

dymo.renderLabel(labelXml).then(imageData => {
	// returns imageData as base64 encoded png.
	// use <img src="data:image/png;base64,${imageData}"/>
	// or require("fs").writeFile("out.png", imageData, 'base64', function(err) {...});
});

how do I get the xml for a label?

Open the free DYMO Label software and design a label. When you have designed one save it. The file it saves is an XML document like the one below. Simply pass that XML or (hint hint) a version of that XML that you did some string replacement on to the print function with a printer name and you are printing labels.

working example that prints a test label

This example will print TEST123 on a shipping size label (2 1/8" x 4") to a printer named 'DYMO LabelWriter 450'.

const Dymo = require('dymojs'),
	   dymo = new Dymo();

dymo.print('DYMO LabelWriter 450', labelXml);

var labelXml = `
<?xml version="1.0" encoding="utf-8"?>
<DieCutLabel Version="8.0" Units="twips">
  <PaperOrientation>Landscape</PaperOrientation>
  <Id>LargeShipping</Id>
  <PaperName>30256 Shipping</PaperName>
  <DrawCommands>
    <RoundRectangle X="0" Y="0" Width="3331" Height="5715" Rx="270" Ry="270"/>
  </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>False</IsVariable>
      <HorizontalAlignment>Left</HorizontalAlignment>
      <VerticalAlignment>Middle</VerticalAlignment>
      <TextFitMode>AlwaysFit</TextFitMode>
      <UseFullFontHeight>True</UseFullFontHeight>
      <Verticalized>False</Verticalized>
      <StyledText>
        <Element>
          <String>T</String>
          <Attributes>
            <Font Family="Helvetica" Size="13" 
            	Bold="False" Italic="False" Underline="False" Strikeout="False"/>
            <ForeColor Alpha="255" Red="0" Green="0" Blue="0"/>
          </Attributes>
        </Element>
        <Element>
          <String>EST123</String>
          <Attributes>
            <Font Family="Helvetica" Size="13" 
            	Bold="False" Italic="False" Underline="False" Strikeout="False"/>
            <ForeColor Alpha="255" Red="0" Green="0" Blue="0"/>
          </Attributes>
        </Element>
      </StyledText>
    </TextObject>
    <Bounds X="335.9998" Y="57.6001" Width="5337.6" Height="3192"/>
  </ObjectInfo>
</DieCutLabel>
`;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].