├── .github
└── workflows
│ └── build.yml
├── .gitignore
├── CHANGELOG
├── INSTALL.md
├── LICENSE
├── Makefile.am
├── README.md
├── TROUBLESHOOTING.md
├── build.sh
├── configure.ac
├── docs
├── DYMO_SDK_for_Linux.rtf
├── Makefile.am
├── SAMPLES
├── TestImage.png
├── longtest.txt
├── test.ps
├── test.txt
└── testprint.ps
├── dymo-cups-drivers.spec
├── install-sh
├── missing
├── mkinstalldirs
├── ppd
├── Makefile.am
├── lm400.ppd
├── lm450.ppd
├── lmmls.ppd
├── lmpc.ppd
├── lmpc2.ppd
├── lmpnp.ppd
├── lmwpnp.ppd
├── lp350.ppd
├── lw300.ppd
├── lw310.ppd
├── lw315.ppd
├── lw320.ppd
├── lw330.ppd
├── lw330t.ppd
├── lw400.ppd
├── lw400t.ppd
├── lw450.ppd
├── lw450dl.ppd
├── lw450dt.ppd
├── lw450t.ppd
├── lw450tt.ppd
├── lw4xl.ppd
├── lw550.ppd
├── lw550p.ppd
├── lw550t.ppd
├── lw550tp.ppd
├── lw5xl.ppd
├── lw5xlp.ppd
├── lwduol.ppd
├── lwduot.ppd
├── lwduot2.ppd
├── lwtt.ppd
├── lww.ppd
└── se450.ppd
├── samples
├── Makefile.am
├── custom_paper
│ ├── CairoUtils.h
│ ├── CustomPaper.cpp
│ └── Makefile.am
├── custom_paper_tape
│ ├── CairoUtils.h
│ ├── CustomPaperTape.cpp
│ └── Makefile.am
├── paper_bounds
│ ├── CairoUtils.h
│ ├── Makefile.am
│ └── PaperBounds.cpp
├── paper_list
│ ├── Makefile.am
│ └── PaperList.cpp
└── test_label
│ ├── CairoUtils.h
│ ├── Makefile.am
│ ├── TestLabel.cpp
│ ├── barcode.png
│ ├── photo.png
│ └── tel.png
├── src
├── Makefile.am
├── common
│ ├── CommonTypedefs.h
│ ├── CupsFilter.h
│ ├── CupsPrintEnvironment.cpp
│ ├── CupsPrintEnvironment.h
│ ├── DummyLanguageMonitor.cpp
│ ├── DummyLanguageMonitor.h
│ ├── ErrorDiffusionHalftoning.cpp
│ ├── ErrorDiffusionHalftoning.h
│ ├── Halftoning.cpp
│ ├── Halftoning.h
│ ├── NonLinearLaplacianHalftoning.cpp
│ ├── NonLinearLaplacianHalftoning.h
│ ├── PrinterDriver.h
│ └── tests
│ │ ├── MOCK_PrintEnvironment.cpp
│ │ ├── MOCK_PrintEnvironment.h
│ │ ├── Makefile.am
│ │ ├── TestCommon.cpp
│ │ ├── TestCommon.h
│ │ ├── TestErrorDiffusionHalftoning.cpp
│ │ ├── TestErrorDiffusionHalftoning.h
│ │ ├── TestNLLHalftoning.cpp
│ │ ├── TestNLLHalftoning.h
│ │ └── testsMain.cpp
├── lm
│ ├── CupsFilterLabelManager.cpp
│ ├── CupsFilterLabelManager.h
│ ├── LabelManagerDriver.cpp
│ ├── LabelManagerDriver.h
│ ├── LabelManagerLanguageMonitor.cpp
│ ├── LabelManagerLanguageMonitor.h
│ ├── Makefile.am
│ ├── raster2dymolm.cpp
│ └── tests
│ │ ├── Makefile.am
│ │ ├── TestLabelManagerDriver.cpp
│ │ ├── TestLabelManagerDriver.h
│ │ ├── TestLabelManagerFilter.cpp
│ │ └── TestLabelManagerFilter.h
└── lw
│ ├── CupsFilterLabelWriter.cpp
│ ├── CupsFilterLabelWriter.h
│ ├── LabelWriterDriver.cpp
│ ├── LabelWriterDriver.h
│ ├── LabelWriterLanguageMonitor.cpp
│ ├── LabelWriterLanguageMonitor.h
│ ├── Makefile.am
│ ├── raster2dymolw.cpp
│ └── tests
│ ├── MOCK_LWLMPrintEnvironment.cpp
│ ├── MOCK_LWLMPrintEnvironment.h
│ ├── Makefile.am
│ ├── TestLabelWriterDriver.cpp
│ ├── TestLabelWriterDriver.h
│ ├── TestLabelWriterFilter.cpp
│ ├── TestLabelWriterFilter.h
│ ├── TestLabelWriterLanguageMonitor.cpp
│ └── TestLabelWriterLanguageMonitor.h
└── src_v2
├── Makefile.am
├── common
├── CommonTypedefs.h
├── CupsFilter.h
├── CupsPrintEnvironment.cpp
├── CupsPrintEnvironment.h
├── CupsUtils.cpp
├── CupsUtils.h
├── DummyLanguageMonitor.h
├── ErrorDiffusionHalftoning.h
├── Halftoning.h
├── NonLinearLaplacianHalftoning.cpp
├── NonLinearLaplacianHalftoning.h
├── PrinterDriver.h
└── tests
│ ├── MOCK_PrintEnvironment.cpp
│ ├── MOCK_PrintEnvironment.h
│ ├── Makefile.am
│ ├── TestCommon.cpp
│ ├── TestCommon.h
│ ├── TestErrorDiffusionHalftoning.cpp
│ ├── TestErrorDiffusionHalftoning.h
│ ├── TestNLLHalftoning.cpp
│ ├── TestNLLHalftoning.h
│ └── testsMain.cpp
├── lm
├── LabelManagerDriver.h
├── LabelManagerDriverInitializer.cpp
├── LabelManagerDriverInitializer.h
├── LabelManagerDriverV2.cpp
├── LabelManagerDriverV2.h
├── LabelManagerLanguageMonitor.h
├── LabelManagerLanguageMonitorV2.cpp
├── LabelManagerLanguageMonitorV2.h
├── Makefile.am
├── raster2dymolm.cpp
└── tests
│ ├── Makefile.am
│ ├── TestLabelManagerDriver.cpp
│ ├── TestLabelManagerDriver.h
│ ├── TestLabelManagerFilter.cpp
│ └── TestLabelManagerFilter.h
└── lw
├── LabelWriterDriver.h
├── LabelWriterDriverInitializer.cpp
├── LabelWriterDriverInitializer.h
├── LabelWriterDriverV2.cpp
├── LabelWriterDriverV2.h
├── LabelWriterLanguageMonitor.h
├── LabelWriterLanguageMonitorV2.cpp
├── LabelWriterLanguageMonitorV2.h
├── Makefile.am
├── raster2dymolw.cpp
└── tests
├── MOCK_LWLMPrintEnvironment.cpp
├── MOCK_LWLMPrintEnvironment.h
├── Makefile.am
├── TestLabelWriterDriver.cpp
├── TestLabelWriterDriver.h
├── TestLabelWriterFilter.cpp
├── TestLabelWriterFilter.h
├── TestLabelWriterLanguageMonitor.cpp
└── TestLabelWriterLanguageMonitor.h
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 |
2 | name: build
3 |
4 | on:
5 | push:
6 | paths:
7 | - '!.**'
8 | - '!**'
9 | - '.github/workflows/build.yml'
10 | - '**.h'
11 | - '**.c'
12 | - '**.cpp'
13 | - '**.ac'
14 | - 'Makefile**'
15 |
16 | # Allows you to run this workflow manually from the Actions tab
17 | workflow_dispatch:
18 |
19 | jobs:
20 | build-image:
21 | name: Compile
22 | runs-on: ubuntu-latest
23 | steps:
24 | - uses: actions/checkout@v2
25 | with:
26 | submodules: true
27 |
28 | - name: Install build dependencies
29 | run: |
30 | sudo apt-get update
31 | sudo apt-get install -q -y --no-install-recommends libcups2-dev libcupsimage2-dev libboost-dev
32 |
33 | - name: Build
34 | run: |
35 | cd ${{ github.workspace }}
36 | autoscan
37 | aclocal
38 | autoconf
39 | autoheader
40 | touch NEWS AUTHORS README ChangeLog
41 | automake --add-missing
42 | automake
43 | ./configure
44 | make
45 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Temporary
3 | *.log
4 | *.bck
5 | *.bak
6 | *.tmp
7 | .*.swp
8 | *~
9 |
10 | # IDE
11 | .vscode
12 | .project
13 | .cproject
14 | .settings
15 | .metadata
16 |
17 | # Generated by GNU Autoconf
18 | AUTHORS
19 | ChangeLog
20 | COPYING
21 | INSTALL
22 | NEWS
23 | README
24 | autom4te.cache
25 | aclocal.m4
26 | .deps
27 | .dirstamp
28 | Makefile.in
29 | Makefile
30 | config.h.in
31 | config.h
32 | config.log
33 | config.status
34 | configure.scan
35 | configure
36 | compile
37 | depcomp
38 | test-driver
39 |
40 | # Compilation artifacts
41 | *.o
42 | *.a
43 | *.elf
44 | *.bin
45 | *.so
46 | *.lo
47 | raster2dymolm
48 | raster2dymolw
49 | raster2dymolm_v2
50 | raster2dymolw_v2
51 | stamp-h1
52 | stamp-h2
53 |
--------------------------------------------------------------------------------
/CHANGELOG:
--------------------------------------------------------------------------------
1 | 1.3.0 - added DYMO LabelWriter SE450 support
2 | 1.2.0 - added 450 series support
3 | 1.1.0 - added LabelWriter 4XL support; required CUPS 1.2
4 | 1.0.3 - fixed compilation problems with gcc 4.3
5 | 1.0.2 - added more debug messages
6 | 1.0.0 - initial revision
--------------------------------------------------------------------------------
/INSTALL.md:
--------------------------------------------------------------------------------
1 |
2 | # How to build
3 |
4 | Requirements:
5 | - GNU Autotools
6 | - GNU C and C++ compilers
7 | - CUPS header files (cups/cups.h, cups/raster.h)
8 | - CUPS libraries (libcups, libcupsimage)
9 | - Boost libraries (libboost-dev)
10 |
11 | To compile the sources run the following commands:
12 | ```sh
13 | autoscan
14 | aclocal
15 | autoconf
16 | autoheader
17 | # Workaround for complaints about missing files:
18 | touch NEWS AUTHORS README ChangeLog
19 | automake --add-missing
20 | automake
21 | ./configure
22 | make
23 | ```
24 |
25 | On Linux systems you can alternatively type:
26 | ```sh
27 | ./build.sh
28 | ```
29 |
30 | To install the compiled binaries and data files use this command (this will require root privileges):
31 | ```sh
32 | make install
33 | ```
34 |
--------------------------------------------------------------------------------
/Makefile.am:
--------------------------------------------------------------------------------
1 | # $Id: Makefile.am 4760 2008-06-19 22:21:35Z vbuzuev $
2 |
3 | # DYMO LabelWriter Drivers
4 | # Copyright (C) 2008 Sanford L.P.
5 |
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License
8 | # as published by the Free Software Foundation; either version 2
9 | # of the License, or (at your option) any later version.
10 |
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 |
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program; if not, write to the Free Software
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 |
20 | SUBDIRS = src src_v2 ppd docs samples
21 | EXTRA_DIST = dymo-cups-drivers.spec LICENSE
22 |
23 | #
24 | # $Id: Makefile.am 4760 2008-06-19 22:21:35Z vbuzuev $
25 | #
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Dymo CUPS printer driver
3 |
4 | This repository is derived from the official Dymo CUPS printer driver for Linux by Vladimir Buzuev.
5 |
6 |
7 | ## Usage
8 |
9 | With this driver, Dymo label printers are usable like any other printer via CUPS.
10 |
11 | Example using lpr:
12 |
13 | * print very long text on a tape:
14 | ```sh
15 | lpr -o landscape -o PageSize=24_mm__1___Label__Auto_ docs/test.txt
16 | ```
17 |
18 | * set printing options specific to the LabelWriter driver
19 | ```sh
20 | lpr -o PageSize=30252_Address -o PrintQuality=Graphics -o PrintDensity=Light docs/test.txt
21 | ```
22 |
23 | * set printing options specific to the LabelManager driver
24 | ```sh
25 | lpr -o PageSize=Address_Label -o CutOptions=ChainMarks -o LabelAlignment=Right -o TapeColor=1
26 | ```
27 |
28 |
29 | ## Supported devices
30 |
31 | * DYMO LabelMANAGER 400
32 | * DYMO LabelMANAGER 450
33 | * DYMO LabelMANAGER PC
34 | * DYMO LabelMANAGER PC II
35 | * DYMO LabelManager PnP*
36 | * DYMO LabelManager Wireless PnP
37 | * Note: `usb_modeswitch` required when connected via USB (`usb_storage` kernel module loaded)
38 | * DYMO LabelPOINT 350
39 | * DYMO LabelWriter 300
40 | * DYMO LabelWriter 310
41 | * DYMO LabelWriter 315
42 | * DYMO LabelWriter 320
43 | * DYMO LabelWriter 330
44 | * DYMO LabelWriter 330 Tubo
45 | * DYMO LabelWriter 400
46 | * DYMO LabelWriter 400 Turbo
47 | * DYMO LabelWriter 450
48 | * DYMO LabelWriter 450 DUO Label
49 | * DYMO LabelWriter 450 DUO Tape
50 | * DYMO LabelWriter 450 Turbo
51 | * DYMO LabelWriter 450 Twin Turbo
52 | * DYMO LabelWriter 4XL
53 | * DYMO LabelWriter DUO Label
54 | * DYMO LabelWriter DUO Tape
55 | * DYMO LabelWriter DUO Tape 128
56 | * DYMO LabelWriter SE450
57 | * DYMO LabelWriter Twin Turbo
58 |
--------------------------------------------------------------------------------
/TROUBLESHOOTING.md:
--------------------------------------------------------------------------------
1 |
2 | # Troubleshooting
3 |
4 |
5 | ## "configure: error: Can't find cups library"
6 |
7 | The CUPS development libraries are missing.
8 |
9 | ~~~sh
10 | $ sudo apt install libcups2-dev
11 | ~~~
12 |
13 |
14 | ## "boost/...: No such file or directory"
15 |
16 | ~~~sh
17 | $ sudo apt install libboost-dev
18 | ~~~
19 |
20 |
21 | ## "CUPS modeldir
is not existed..."
22 |
23 | This may occur, when CUPS is installed in a different path, than expected.
24 | `configure` tries to determine where CUPS is installed using the `cups-config` utility.
25 | If the latter is not found, default values are used.
26 | Default directories for CUPS are '/usr/share/cups' and '/usr/lib/cups'.
27 |
28 | This behaviour can be changed using environment variables, e.g.
29 |
30 | ~~~sh
31 | $ cups_datadir='/usr/local/share/cups' cups_serverbindir='/usr/local/lib/cups' ./configure
32 | ~~~
33 |
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Exit on any error
4 | set -e
5 |
6 | autoscan
7 |
8 | aclocal
9 | autoconf
10 |
11 | autoheader
12 | # a workaround
13 | touch NEWS AUTHORS INSTALL README ChangeLog
14 | automake --add-missing
15 | automake
16 | rm NEWS AUTHORS INSTALL README ChangeLog
17 |
18 | ./configure
19 |
20 | make
21 |
22 |
--------------------------------------------------------------------------------
/configure.ac:
--------------------------------------------------------------------------------
1 | # $Id: CupsPrintEnvironment.cpp 1216 2006-12-18 16:51:12Z vbuzuev $
2 |
3 | # DYMO LabelWriter Drivers
4 | # Copyright (C) 2008 Sanford L.P.
5 |
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License
8 | # as published by the Free Software Foundation; either version 2
9 | # of the License, or (at your option) any later version.
10 |
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 |
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program; if not, write to the Free Software
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 |
20 | AC_PREREQ(2.59)
21 | AC_INIT(dymo-cups-drivers, 1.4.0.5, vbuzuev@dymo.com)
22 | AM_INIT_AUTOMAKE([subdir-objects])
23 | AC_CONFIG_SRCDIR([src/lw/CupsFilterLabelWriter.h])
24 | AC_CONFIG_HEADER([config.h])
25 |
26 | # get cups dirs
27 | # if there is cups-config utility - use it
28 | # otherwise if there are user supplyed values - use it
29 | # otherwise - use default values
30 | cupsdatadir=$BUILDROOT$cups_datadir
31 | cupsserverbindir=$BUILDROOT$cups_serverbindir
32 | cups_cflags=""
33 |
34 | if test x"$cupsdatadir" = x; then
35 | cupsdatadir=$BUILDROOT/usr/share/cups
36 | fi
37 |
38 | if test x"$cupsserverbindir" = x; then
39 | cupsserverbindir=$BUILDROOT/usr/lib/cups
40 | fi
41 |
42 | #check for cups-config
43 | cupsc=""
44 | AC_PATH_PROG(cupsc, cups-config)
45 | if test x"$cupsc" != x; then
46 | cupsdatadir=$BUILDROOT`cups-config --datadir`
47 | cupsserverbindir=$BUILDROOT`cups-config --serverbin`
48 | cups_cflags=`cups-config --cflags`
49 | fi
50 |
51 | cupsmodeldir=${cupsdatadir}/model
52 | cupsfilterdir=${cupsserverbindir}/filter
53 |
54 | #check that cups dirs are corrects
55 | #if test ! -d $cupsmodeldir; then
56 | # AC_ERROR([CUPS model dir '$cupsmodeldir' is not existed. Check your params for CUPS dirs])
57 | #fi
58 |
59 | #if test ! -d $cupsfilterdir; then
60 | # AC_ERROR([CUPS filter dir '$cupsfilterdir' is not existed. Check your params for CUPS dirs])
61 | #fi
62 |
63 | AC_SUBST(cupsmodeldir)
64 | AC_SUBST(cupsfilterdir)
65 |
66 |
67 | AC_ARG_ENABLE([samples],
68 | [ --enable-samples Build with samples],
69 | [case "${enableval}" in
70 | yes) samples=true ;;
71 | no) samples=false ;;
72 | *) AC_MSG_ERROR([bad value ${enableval} for --enable-samples]) ;;
73 | esac],
74 | [samples=false])
75 |
76 | AM_CONDITIONAL([SAMPLES], [test x$samples = xtrue])
77 |
78 | #samplesdir=samples
79 | #AC_SUBST(samplesdir)
80 |
81 | # check for proper CUPS version - 1.1 for now
82 | #cups_version=`cups-config --api-version`
83 | #if test x"$cups_version" = x1.0; then
84 | # AC_ERROR(CUPS version 1.1 is required)
85 | #fi
86 |
87 | AC_SUBST(cups_cflags)
88 |
89 | warning_flags="-Wall -Wno-unknown-pragmas"
90 | debug_flags=""
91 | optimization_flags="-O2"
92 | CXXFLAGS="${optimization_flags} ${warning_flags} ${debug_flags} ${cups_cflags}"
93 |
94 |
95 | AC_CHECK_LIB(cups, cupsMarkOptions, , AC_ERROR([Can't find cups library]))
96 | AC_CHECK_LIB(cupsimage, cupsRasterReadHeader, , AC_ERROR([Can't find cupsimage library]))
97 | AC_CHECK_HEADERS([cups/cups.h cups/raster.h],, AC_ERROR([Can't find cups headers]))
98 |
99 | AC_CHECK_LIB(pthread, pthread_create,, AC_ERROR([Can't find pthread library]))
100 | AC_CHECK_HEADERS([pthread.h],, AC_ERROR([Can't find pthread headers]))
101 |
102 | #CUPS_LIBS=`cups-config --image --libs`
103 | #CUPS_LIBS="-lcups -lcupsimage"
104 | CUPS_LIBS=""
105 | AC_SUBST(CUPS_LIBS)
106 |
107 | # Checks for programs.
108 | AC_PROG_CXX
109 | AC_PROG_CC
110 |
111 | # Checks for libraries.
112 |
113 | # Checks for header files.
114 | AC_HEADER_STDC
115 | AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
116 |
117 | # Checks for typedefs, structures, and compiler characteristics.
118 | AC_HEADER_STDBOOL
119 | AC_C_CONST
120 | AC_C_INLINE
121 | AC_TYPE_SIZE_T
122 |
123 | # Checks for library functions.
124 | AC_CHECK_FUNCS([memset strcasecmp])
125 |
126 | AC_CONFIG_FILES([Makefile src/Makefile src/common/tests/Makefile src/lm/Makefile src/lm/tests/Makefile src/lw/Makefile src/lw/tests/Makefile src_v2/Makefile src_v2/common/tests/Makefile src_v2/lm/Makefile src_v2/lm/tests/Makefile src_v2/lw/Makefile src_v2/lw/tests/Makefile ppd/Makefile docs/Makefile samples/Makefile samples/paper_list/Makefile samples/paper_bounds/Makefile samples/test_label/Makefile samples/custom_paper/Makefile samples/custom_paper_tape/Makefile])
127 | AC_OUTPUT
128 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/docs/Makefile.am:
--------------------------------------------------------------------------------
1 | # $Id: Makefile.am 4759 2008-06-19 19:02:27Z vbuzuev $
2 |
3 | # DYMO LabelWriter Drivers
4 | # Copyright (C) 2008 Sanford L.P.
5 |
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License
8 | # as published by the Free Software Foundation; either version 2
9 | # of the License, or (at your option) any later version.
10 |
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 |
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program; if not, write to the Free Software
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 |
20 | EXTRA_DIST = SAMPLES TestImage.png longtest.txt test.ps test.txt testprint.ps DYMO_SDK_for_Linux.rtf
21 |
22 | #
23 | # $Id: Makefile.am 4759 2008-06-19 19:02:27Z vbuzuev $
24 | #
25 |
--------------------------------------------------------------------------------
/docs/SAMPLES:
--------------------------------------------------------------------------------
1 | This file contains sample commands could be used to print different file types.
2 | It also includes example how to set printing options supported by the drivers.
3 |
4 | Note, all commands use default printer as a destination printer.
5 | To use other then the default printer, add "-P " option to the commands.
6 |
7 |
8 | Sample commands for LabelWriter:
9 |
10 | 1. printing PostScript file
11 | lpr -o landscape -o PageSize=w167h288 test.ps
12 |
13 | 2. printing image file
14 | lpr -o ppi=300 -o PageSize=w167h288 -o PrintQuality=Graphics TestImage.png
15 |
16 | 3. printing text file
17 | lpr -o PageSize=w167h288 -o PrintQuality=Text test.txt
18 |
19 | 4. printing on "continuous" paper
20 | lpr -o PageSize=w154h7680 -o PrintQuality=Text test.txt
21 |
22 | 5. printing on specific roll on Twin Turbo
23 | lpr -o PageSize=w167h288 -o InputSlot=Right test.txt
24 | lpr -o PageSize=w167h288 -o InputSlot=Left test.txt
25 | lpr -o PageSize=w167h288 -o InputSlot=Auto test.txt
26 |
27 | 6. using different quality
28 | lpr -o ppi=300 -o PageSize=w167h288 -o PrintQuality=Graphics TestImage.png
29 | lpr -o ppi=300 -o PageSize=w167h288 -o PrintQuality=Text TestImage.png
30 |
31 | 7. using different darkness
32 | lpr -o ppi=300 -o PageSize=w167h288 -o PrintDensity=Light TestImage.png
33 | lpr -o ppi=300 -o PageSize=w167h288 -o PrintDensity=Medium TestImage.png
34 | lpr -o ppi=300 -o PageSize=w167h288 -o PrintDensity=Normal TestImage.png
35 | lpr -o ppi=300 -o PageSize=w167h288 -o PrintDensity=Dark TestImage.png
36 |
37 | Sample commands for LabelMANAGER:
38 |
39 | 1. printing PostScript file
40 | lpr -o landscape -o PageSize=w68h252 test.ps
41 |
42 | 2. printing text file
43 | lpr -o landscape -o PageSize=w68h252 test.txt
44 |
45 | 3. printing aligned labels
46 | lpr -o landscape -o PageSize=w68h252 -o LabelAlignment=Left test.txt
47 | lpr -o landscape -o PageSize=w68h252 -o LabelAlignment=Right test.txt
48 | lpr -o landscape -o PageSize=w68h252 -o LabelAlignment=Center test.txt
49 |
50 | 4. printing on "auto" paper - does not print empty lines at the end of the label
51 | lpr -o landscape -o Pagesize=w68h4000 longtest.txt
52 | lpr -o landscape -o Pagesize=w68h252 longtest.txt
53 |
54 | 5. using different cutting options
55 | lpr -o landscape -o Pagesize=w68h252 -o CutOptions=ChainMarks longtest.txt
56 |
57 | 6. using different tape color
58 | lpr -o landscape -o PageSize=w68h252 -o TapeColor=0 test.txt
59 | lpr -o landscape -o PageSize=w68h252 -o TapeColor=1 test.txt
60 | lpr -o landscape -o PageSize=w68h252 -o TapeColor=12 test.txt
61 |
62 | 7. printing in continuous mode - leader/trailer is not used
63 | lpr -o landscape -o Pagesize=w68h252 -o ContinuousPaper=0 longtest.txt
64 | lpr -o landscape -o Pagesize=w68h252 -o ContinuousPaper=1 longtest.txt
65 | lpr -o landscape -o Pagesize=w68h252 -o ContinuousPaper=1 -o CutOptions=ChainMarks longtest.txt
66 |
67 |
--------------------------------------------------------------------------------
/docs/TestImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthiasbock/dymo-cups-drivers/eb2ad031114f4aaaf9b8d576d9596b1a9585c434/docs/TestImage.png
--------------------------------------------------------------------------------
/docs/longtest.txt:
--------------------------------------------------------------------------------
1 | Printer Long Test Page
2 | Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!
--------------------------------------------------------------------------------
/docs/test.ps:
--------------------------------------------------------------------------------
1 | %!PS-Adobe-3.0
2 | %%BoundingBox: 0 0 612 792
3 | %%Pages: 1
4 | %%LanguageLevel: 1
5 | %%DocumentData: Clean7Bit
6 | %%DocumentSuppliedResources: procset testprint/1.1
7 | %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman
8 | %%Title: Test Page
9 | %%EndComments
10 | %%BeginProlog
11 | %%BeginResource procset testprint 1.1 0
12 | /CENTER {
13 | dup stringwidth pop
14 | 0.5 mul neg 0 rmoveto
15 | show
16 | }bind def
17 | %%EndResource
18 | %%EndProlog
19 | %%Page: 1 1
20 | gsave
21 |
22 | initclip newpath clippath pathbbox
23 | 72 div /pageTop exch def
24 | 72 div /pageRight exch def
25 | 72 div /pageBottom exch def
26 | 72 div /pageLeft exch def
27 |
28 | 4 setlinewidth
29 | 0 setgray closepath stroke
30 | 1 setlinewidth
31 |
32 | /pageWidth pageRight pageLeft sub def
33 | /pageHeight pageTop pageBottom sub def
34 |
35 | /bigFont /Helvetica-Bold findfont
36 | 18 scalefont def
37 |
38 | pageLeft 72 mul
39 | pageBottom 72 mul
40 | translate
41 |
42 | 0 setgray
43 |
44 | pageWidth 36 mul
45 | pageHeight 72 mul 18 sub
46 | 2 copy moveto
47 | bigFont setfont
48 | (Printer Test Page) CENTER
49 |
50 | pageWidth 36 mul
51 | pageHeight 36 mul 18 sub
52 | 2 copy moveto
53 | bigFont setfont
54 | (Hello, World!) CENTER
55 |
56 | grestore
57 | showpage
58 | %%EOF
59 |
--------------------------------------------------------------------------------
/docs/test.txt:
--------------------------------------------------------------------------------
1 | Printer Test Page
2 | Hello, World!
--------------------------------------------------------------------------------
/dymo-cups-drivers.spec:
--------------------------------------------------------------------------------
1 | # $Id: dymo-cups-drivers.spec 4913 2008-07-10 22:17:43Z vbuzuev $
2 |
3 | # DYMO LabelWriter Drivers
4 | # Copyright (C) 2008 Sanford L.P.
5 |
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License
8 | # as published by the Free Software Foundation; either version 2
9 | # of the License, or (at your option) any later version.
10 |
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 |
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program; if not, write to the Free Software
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 |
20 | Summary: DYMO LabelWriter Drivers for CUPS
21 | Name: dymo-cups-drivers
22 | Version: 1.0.1
23 | Release: 0
24 | License: GPL
25 | Group: System Environment/Libraries
26 | Source: dymo-cups-drivers-%{version}.tar.gz
27 | Url: http://www.dymo.com
28 | Packager: Anonymous
29 | Vendor: DYMO
30 |
31 | # Use buildroot so as not to disturb the version already installed
32 | BuildRoot: /var/tmp/%{name}-root
33 |
34 | # Dependencies...
35 | #Requires: cups, cups-devel
36 |
37 |
38 | %description
39 | DYMO LabelWriter and DYMO LabelMANAGER series drivers for CUPS
40 |
41 | %prep
42 | %setup
43 |
44 | %build
45 | CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" BUILDROOT=$RPM_BUILD_ROOT ./configure
46 |
47 | # If we got this far, all prerequisite libraries must be here.
48 | make
49 |
50 | %install
51 | # Make sure the RPM_BUILD_ROOT directory exists.
52 | rm -rf $RPM_BUILD_ROOT
53 |
54 | make BUILDROOT=$RPM_BUILD_ROOT install
55 |
56 | %post
57 |
58 | %preun
59 |
60 | %clean
61 | rm -rf $RPM_BUILD_ROOT
62 |
63 | %files
64 | %defattr(-,root,root)
65 |
66 | %dir /usr/lib/cups
67 | /usr/lib/cups/*
68 | %dir /usr/share/cups
69 | /usr/share/cups/*
70 |
71 |
72 | #
73 | # End of "$Id: dymo-cups-drivers.spec 4913 2008-07-10 22:17:43Z vbuzuev $".
74 | #
75 |
--------------------------------------------------------------------------------
/mkinstalldirs:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # mkinstalldirs --- make directory hierarchy
3 | # Author: Noah Friedman
4 | # Created: 1993-05-16
5 | # Public domain
6 |
7 | # $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
8 |
9 | errstatus=0
10 |
11 | for file
12 | do
13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
14 | shift
15 |
16 | pathcomp=
17 | for d
18 | do
19 | pathcomp="$pathcomp$d"
20 | case "$pathcomp" in
21 | -* ) pathcomp=./$pathcomp ;;
22 | esac
23 |
24 | if test ! -d "$pathcomp"; then
25 | echo "mkdir $pathcomp"
26 |
27 | mkdir "$pathcomp" || lasterr=$?
28 |
29 | if test ! -d "$pathcomp"; then
30 | errstatus=$lasterr
31 | fi
32 | fi
33 |
34 | pathcomp="$pathcomp/"
35 | done
36 | done
37 |
38 | exit $errstatus
39 |
40 | # mkinstalldirs ends here
41 |
--------------------------------------------------------------------------------
/ppd/Makefile.am:
--------------------------------------------------------------------------------
1 | # $Id: Makefile.am 15958 2011-09-02 14:37:33Z pineichen $
2 |
3 | # DYMO LabelWriter Drivers
4 | # Copyright (C) 2008 Sanford L.P.
5 |
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License
8 | # as published by the Free Software Foundation; either version 2
9 | # of the License, or (at your option) any later version.
10 |
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 |
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program; if not, write to the Free Software
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 |
20 |
21 | dist_cupsmodel_DATA = \
22 | lm400.ppd \
23 | lm450.ppd \
24 | lmpc.ppd \
25 | lmpc2.ppd \
26 | lmpnp.ppd \
27 | lmwpnp.ppd \
28 | lp350.ppd \
29 | lw300.ppd \
30 | lw310.ppd \
31 | lw315.ppd \
32 | lw320.ppd \
33 | lw330.ppd \
34 | lw330t.ppd \
35 | lw400.ppd \
36 | lw400t.ppd \
37 | lwduol.ppd \
38 | lwduot.ppd \
39 | lwduot2.ppd \
40 | lwtt.ppd \
41 | lw4xl.ppd \
42 | lw450.ppd \
43 | lw450t.ppd \
44 | lw450tt.ppd \
45 | lw450dl.ppd \
46 | lw450dt.ppd \
47 | se450.ppd \
48 | lmmls.ppd \
49 | lw550.ppd \
50 | lw550p.ppd \
51 | lw550t.ppd \
52 | lw550tp.ppd \
53 | lw5xl.ppd \
54 | lw5xlp.ppd \
55 | lww.ppd
56 |
57 | tests = testppd
58 | check_PROGRAMS = testppd
59 |
60 | testppd_SOURCES=
61 |
62 | testppd$(EXEEXT):
63 | cupstestppd $(dist_cupsmodel_DATA)
64 |
--------------------------------------------------------------------------------
/samples/Makefile.am:
--------------------------------------------------------------------------------
1 | # $Id: Makefile.am 8487 2009-05-22 22:03:27Z vbuzuev $
2 |
3 | # DYMO LabelWriter Drivers
4 | # Copyright (C) 2008 Sanford L.P.
5 |
6 | # This program is free software; you can redistribute it and/or
7 | # modify it under the terms of the GNU General Public License
8 | # as published by the Free Software Foundation; either version 2
9 | # of the License, or (at your option) any later version.
10 |
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 |
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program; if not, write to the Free Software
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 |
20 | SUBDIRS = paper_bounds paper_list test_label custom_paper custom_paper_tape
21 |
22 | #
23 | # $Id: Makefile.am 8487 2009-05-22 22:03:27Z vbuzuev $
24 | #
25 |
--------------------------------------------------------------------------------
/samples/custom_paper/CairoUtils.h:
--------------------------------------------------------------------------------
1 | #ifndef __CAIRO_UTILS__
2 | #define __CAIRO_UTILS__
3 |
4 | #include
5 |
6 |
7 | class CairoSurfacePtr
8 | {
9 | public:
10 | CairoSurfacePtr(cairo_surface_t* ptr): ptr_(ptr) {}
11 | ~CairoSurfacePtr() { cairo_surface_destroy(ptr_); }
12 |
13 | cairo_surface_t* operator*() { return ptr_; }
14 | operator cairo_surface_t* () { return ptr_; }
15 | private:
16 | cairo_surface_t* ptr_;
17 |
18 | };
19 |
20 | class CairoPtr
21 | {
22 | public:
23 | CairoPtr(cairo_t* ptr): ptr_(ptr) {}
24 | ~CairoPtr() { cairo_destroy(ptr_); }
25 |
26 | cairo_t* operator*() { return ptr_; }
27 | operator cairo_t* () { return ptr_; }
28 |
29 | private:
30 | cairo_t* ptr_;
31 |
32 | };
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/samples/custom_paper/CustomPaper.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include