[cups.general] Printing to a File

Matthew T. O'Connor matthew at zeut.net
Tue Jun 19 15:39:46 PDT 2007


Hello,

I'm trying to do something that I thought would be very simple, that is, 
setup a cups printer that will just dump it's output to a file.

The reason I'm doing this is that I have a program that prints to a 
Zebra barcode printer.  However the program isn't working and I want to 
see exactly what my program is sending to the printer.  I tried to 
create a RAW local printqueue that points to /tmp/foo or some such 
thing.  I restarted cups but it doesn't work, nothing ever goes into the 
file.

I am running Fedora Core 1, with stock cups (1.1.19), and using 
redhat-config-printer-tui to setup the device which adds an entry into 
the cupsd.conf

<Location /printers/pfile>
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
AuthType None
</Location>

and the printers.conf

<Printer pfile>
Info Created by redhat-config-printer 0.6.x
DeviceURI file:/pfile
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

When I turn up the LogLevel to debug I get the following:

D [19/Jun/2007:19:36:15 -0500] StartJob: 
envp[13]="CUPS_DATADIR=/usr/share/cups"
D [19/Jun/2007:19:36:15 -0500] StartJob: 
envp[14]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [19/Jun/2007:19:36:15 -0500] StartJob: statusfds = [ 9 11 ]
D [19/Jun/2007:19:36:15 -0500] StartJob: filterfds[1] = [ 12 -1 ]
D [19/Jun/2007:19:36:15 -0500] ProcessIPPRequest: 8 status_code=0
D [19/Jun/2007:19:36:15 -0500] UpdateJob: job 82090, file 0 is complete.
D [19/Jun/2007:19:36:15 -0500] CancelJob: id = 82090
D [19/Jun/2007:19:36:15 -0500] StopJob: id = 82090, force = 0
D [19/Jun/2007:19:36:15 -0500] StopJob: printer state is 3
D [19/Jun/2007:19:36:15 -0500] CloseClient() 8
D [19/Jun/2007:19:36:35 -0500] AcceptClient() 8 from localhost:631.
D [19/Jun/2007:19:36:35 -0500] ReadClient() 8 POST / HTTP/1.1
D [19/Jun/2007:19:36:35 -0500] ProcessIPPRequest: 8 status_code=1
D [19/Jun/2007:19:36:35 -0500] CloseClient() 8
D [19/Jun/2007:19:36:35 -0500] AcceptClient() 8 from localhost:631.
D [19/Jun/2007:19:36:35 -0500] ReadClient() 8 POST / HTTP/1.1
D [19/Jun/2007:19:36:35 -0500] ProcessIPPRequest: 8 status_code=1
D [19/Jun/2007:19:36:35 -0500] CloseClient() 8
D [19/Jun/2007:19:36:35 -0500] AcceptClient() 8 from localhost:631.
D [19/Jun/2007:19:36:35 -0500] ReadClient() 8 POST / HTTP/1.1
D [19/Jun/2007:19:36:35 -0500] ProcessIPPRequest: 8 status_code=0
D [19/Jun/2007:19:36:35 -0500] ReadClient() 8 POST /printers/pfile HTTP/1.1
D [19/Jun/2007:19:36:35 -0500] print_job: auto-typing file...
D [19/Jun/2007:19:36:35 -0500] print_job: request file type is text/plain.
D [19/Jun/2007:19:36:35 -0500] CancelJob: id = 81575
D [19/Jun/2007:19:36:35 -0500] check_quotas: requesting-user-name = 'root'
D [19/Jun/2007:19:36:35 -0500] print_job: requesting-user-name = 'root'
I [19/Jun/2007:19:36:35 -0500] Adding start banner page "none" to job 82091.
I [19/Jun/2007:19:36:35 -0500] Adding end banner page "none" to job 82091.
I [19/Jun/2007:19:36:35 -0500] Job 82091 queued on 'pfile' by 'root'.
D [19/Jun/2007:19:36:35 -0500] Job 82091 hold_until = 0
D [19/Jun/2007:19:36:35 -0500] StartJob(82091, 0xa03db40)
D [19/Jun/2007:19:36:35 -0500] StartJob() id = 82091, file = 0/1
D [19/Jun/2007:19:36:35 -0500] StartJob: Sending job to queue tagged as 
raw...
D [19/Jun/2007:19:36:35 -0500] job-sheets=none,none
D [19/Jun/2007:19:36:35 -0500] banner_page = 0
D [19/Jun/2007:19:36:35 -0500] StartJob: argv = 
"pfile","82091","root",".Xresources","1","","/var/spool/cups/d82091-001"
D [19/Jun/2007:19:36:35 -0500] StartJob: 
envp[0]="PATH=/usr/lib/cups/filter:/bin:/usr/bin"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[1]="SOFTWARE=CUPS/1.1"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[2]="USER=root"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[3]="CHARSET=utf-8"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[4]="LANG=en_US"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[5]=""
D [19/Jun/2007:19:36:35 -0500] StartJob: 
envp[6]="PPD=/etc/cups/ppd/pfile.ppd"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[7]="CUPS_SERVERROOT=/etc/cups"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[8]="RIP_MAX_CACHE=8m"
D [19/Jun/2007:19:36:35 -0500] StartJob: 
envp[9]="TMPDIR=/var/spool/cups/tmp"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[10]="CONTENT_TYPE=text/plain"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[11]="DEVICE_URI=file:/pfile"
D [19/Jun/2007:19:36:35 -0500] StartJob: envp[12]="PRINTER=pfile"
D [19/Jun/2007:19:36:35 -0500] StartJob: 
envp[13]="CUPS_DATADIR=/usr/share/cups"
D [19/Jun/2007:19:36:35 -0500] StartJob: 
envp[14]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [19/Jun/2007:19:36:35 -0500] StartJob: statusfds = [ 9 11 ]
D [19/Jun/2007:19:36:35 -0500] StartJob: filterfds[1] = [ 12 -1 ]
D [19/Jun/2007:19:36:35 -0500] ProcessIPPRequest: 8 status_code=0
D [19/Jun/2007:19:36:35 -0500] UpdateJob: job 82091, file 0 is complete.
D [19/Jun/2007:19:36:35 -0500] CancelJob: id = 82091
D [19/Jun/2007:19:36:35 -0500] StopJob: id = 82091, force = 0
D [19/Jun/2007:19:36:35 -0500] StopJob: printer state is 3
D [19/Jun/2007:19:36:35 -0500] CloseClient() 8





More information about the cups mailing list