Skip to content

Instantly share code, notes, and snippets.

@gwpl
Last active January 12, 2019 00:19
Show Gist options
  • Save gwpl/d6f90e41c5b07cd9f9262e4c6515037d to your computer and use it in GitHub Desktop.
Save gwpl/d6f90e41c5b07cd9f9262e4c6515037d to your computer and use it in GitHub Desktop.
Adding Custom Page to ppd. Definition of S0929100 Cards for LabelWriter printers (including Dymo 450 LabelWriter), as this roll is missing in Linux Drivers (lw450.ppd and other .ppd files) and Macintosh dymo.ppd file. It's reconstructed by hand. I've send email to technical support, so let's work on this one until official specification for roll…

Definition of S0929100 Cards for LabelWriter printers (including Dymo 450 LabelWriter), as this roll is missing in Linux Drivers (lw450.ppd and other .ppd files) and Macintosh dymo.ppd file. It's reconstructed by hand. I've send email to technical support, so let's work on this one until official specification for roll will arrive.

Please note you need to add each line to appropriate section in .ppd file according to : http://stackoverflow.com/a/3112256/544721 (On my systems, lw450.ppd files were located in /usr/share/cups/model/lw450.ppd)

Update: When I tried to apply patch below on dymo-cups-drivers-1.4.0.5 (dymo-cups-drivers-1.4.0.tar.gz), it turned out that there is already another definition of w144h252 page. Testing:

# cupstestppd -W all /usr/share/cups/model/lw450.ppd | grep FAIL
/usr/share/cups/model/lw450.ppd: FAIL
      **FAIL**  Multiple occurrences of option PageRegion choice name w144h252.
      **FAIL**  Multiple occurrences of option PageSize choice name w144h252.

When I checked:

# grep  w144h252 /usr/share/cups/model/lw450.ppd | grep PageRegion
*PageRegion w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
*PageRegion w144h252/30374 Appointment Card: "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"

It become clear, that Dymo did not provided information that S0929100 is same product as 30374 (most rolls have both codes on boxes, these have only one)! After all, let's use 30374 definition, without patching driver, but let's use below as example of how to add custom page to ppd file.

Therefore, I've found that

--- /usr/share/cups/model/lw450.ppd.bak 2016-05-01 20:44:35.841897222 +0200
+++ /usr/share/cups/model/lw450.ppd 2016-05-01 20:47:15.865890088 +0200
@@ -147,6 +147,7 @@
*OpenUI *PageSize/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageSize
*DefaultPageSize: w167h288
+*PageSize w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
*PageSize w154h64/11351 Jewelry Label: "<</PageSize[154 64]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
*PageSize w72h154/11352 Return Address Int: "<</PageSize[72 154]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
*PageSize w72h72/11353 Multi-Purpose: "<</PageSize[72 72]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
@@ -213,6 +214,7 @@
*OpenUI *PageRegion: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: w167h288
+*PageRegion w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
*PageRegion w154h64/11351 Jewelry Label: "<</PageSize[154 64]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
*PageRegion w72h154/11352 Return Address Int: "<</PageSize[72 154]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
*PageRegion w72h72/11353 Multi-Purpose: "<</PageSize[72 72]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
@@ -277,6 +279,7 @@
*CloseUI: *PageRegion
*DefaultImageableArea: w167h288
+*ImageableArea w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "0.00 4.32 141.12 235.44"
*ImageableArea w154h64/11351 Jewelry Label: "0.00 4.32 150.72 58.80"
*ImageableArea w72h154/11352 Return Address Int: "4.08 4.32 69.12 146.64"
*ImageableArea w72h72/11353 Multi-Purpose: "4.08 4.32 69.12 65.28"
@@ -340,6 +343,7 @@
*ImageableArea w154h792/Continuous, Wide: "4.32 4.32 150.24 775.68"
*DefaultPaperDimension: w167h288
+*PaperDimension w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "144.00 252.00"
*PaperDimension w154h64/11351 Jewelry Label: "153.60 63.12"
*PaperDimension w72h154/11352 Return Address Int: "72.00 153.12"
*PaperDimension w72h72/11353 Multi-Purpose: "72.00 72.00"
*PageSize w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
*PageRegion w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "<</PageSize[144 252]/ImagingBBox null/cupsInteger0 0>>setpagedevice"
*ImageableArea w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "0.00 4.32 141.12 235.44"
*PaperDimension w144h252/S0929100 Cards - Appointment Name Badge 51x89 mm : "144.00 252.00"
@bradllj
Copy link

bradllj commented Oct 30, 2017

Thanks it works great. Been spending days trying to figure out why this receipt printer keeps printing 6 inches between images.

@grouser
Copy link

grouser commented Sep 3, 2018

Hello,

Thanks for the info. I have set the appointment one but I still get some margin in the label. Do you have this problem?

Thanks.

@vfrico
Copy link

vfrico commented Jan 11, 2019

I use the 99012 labels but I also have a start margin on the top and on the left of the label. I don't know how to solve it... It is a {driver/ppd} file problem or it is a hardware problem?

Let me know if you have anything to solve this issue

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment