[cups] Cut paper

Simon Hausdorf info at shausdorf.de
Wed Dec 16 07:18:27 PST 2015


Thank you Helge for your work.

So is there maybe another filter instead of rastertolabel?
I know that https://www.peninsula-group.com <https://www.peninsula-group.com/> is also using cups and it is cutting the label.

They are using their own filter but peninsula costs 97 EUR.
Also they are printing an watermark on the labels if you are using the demo or the filter.

I think it would be to complicated for me to write a workaround for this problem.


> Am 16.12.2015 um 15:48 schrieb Helge Blischke <helgeblischke at web.de>:
> 
> 
>> Well, I’ll install a fake zebra printer to be able to look into the output
>> of gstoraster as well as rastertolabel and trace down where the
>> CutMedia stuff disappears.
>> 
>> Helge
> 
> Well, I’ve done that, using your PPD.
> 
> Here is an excerpt of the cups error_log when printing a test page:
> 
> ….
> I [16/Dec/2015:15:18:05 +0100] [Job 297] Started filter /usr/libexec/cups/filter/cgbannertopdf (PID 7128)
> I [16/Dec/2015:15:18:05 +0100] [Job 297] Started filter /usr/libexec/cups/filter/gstoraster (PID 7129)
> I [16/Dec/2015:15:18:05 +0100] [Job 297] Started filter /usr/libexec/cups/filter/rastertolabel (PID 7130)
> I [16/Dec/2015:15:18:05 +0100] [Job 297] Started backend /usr/libexec/cups/backend/socket (PID 7131)
> 
> ….
> 
> D [16/Dec/2015:15:18:06 +0100] [Job 297] StartPage...
> D [16/Dec/2015:15:18:06 +0100] [Job 297] MediaClass = ""
> D [16/Dec/2015:15:18:06 +0100] [Job 297] MediaColor = ""
> D [16/Dec/2015:15:18:06 +0100] [Job 297] MediaType = ""
> D [16/Dec/2015:15:18:06 +0100] [Job 297] OutputType = ""
> D [16/Dec/2015:15:18:06 +0100] [Job 297] AdvanceDistance = 0
> D [16/Dec/2015:15:18:06 +0100] [Job 297] AdvanceMedia = 0
> D [16/Dec/2015:15:18:06 +0100] [Job 297] Collate = 0
> D [16/Dec/2015:15:18:06 +0100] [Job 297] CutMedia = 4
> D [16/Dec/2015:15:18:06 +0100] [Job 297] Duplex = 0
> D [16/Dec/2015:15:18:06 +0100] [Job 297] HWResolution = [ 203 203 ]
> D [16/Dec/2015:15:18:06 +0100] [Job 297] ImagingBoundingBox = [ 0 0 288 360 ]
> D [16/Dec/2015:15:18:06 +0100] [Job 297] InsertSheet = 0
> D [16/Dec/2015:15:18:06 +0100] [Job 297] Jog = 0
> 
>> 
> You see, the raster data header has the "CutMedia = 4“ set.
> 
> The EPL2 data stream looks like (beginning and end):
> 
> N
> D10
> q816
> GW0,0,102,1
> …data…
>>> GW0,1014,102,1
> …data…
> P1
> 
> You see, the data stream begins with the commands to reset the printer,
> set the density and the label width, followed by a series of graphic data lines,
> and ends with the command to print one label.
> 
> There is no cutting related command whatsoever – there should be the C command
> at the end to cut immediately.
> 
> So, I think there is a bug in the rastertolabel filter. 
> I looked into the source of this filter (cups version 2.1.0) and found that cutting is only
> implemented for ZPL printers.
> 
> So I’d suggest you file a bug at cups.org <http://cups.org/> and see what Michael Sweet replies.
> 
> In the meantime you could perhaps hack (or let hack) a wrapper script around
> the rastertolabel filter that looks for the CutMedia setting in the input and appends
> the cut command to the output, and it certainly would be your turn to do the testing
> with the real printer.
> 
> Helge
> 
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups




More information about the cups mailing list