Ascii files not formated correctly

Helge Blischke h.blischke at srz.de
Mon Oct 17 03:44:13 PDT 2005


Walt Meier wrote:
> 
> I've been running Slackware for several years, and always used LPD for
> printing.  Slackware made CUPS the default print manager a while ago,
> but I still continued to use LPD.  I recently installed Slackware 10.2,
> and thought I'd step up and try CUPS instead of LPD.  So I am running
> Slackware 10.2 with my own 2.4.29 compiled kernel.
> 
> Short story:  I have a true Postscript printer, and I can print postscipt
> files perfectly fine.   But when I use lpr to print an ascii text file,
> the lines are too far to the left on the paper and the first 2 characters
> of each line don't print at all.  Am I supposed to be able to use lpr to
> print a plain text file?
> 
> Details:
> 
> I have a Lexmark E-312 Postscript printer, connected to an HP JetDirect.
> 
> I found the appropriate PPD file (Lexmark-Optra_E312-Postscript.ppd) on
> linuxprinting.org, and copied it to /usr/share/cups/model.
> 
> From my /etc/hosts file:
> 
>     192.168.0.161   optra_e312  #this should really be called "jetdirect"
> 
> I installed the printer with this command:
> 
> /usr/sbin/lpadmin -p laserjet -m Lexmark-Optra_E312-Postscript.ppd -v \
>             socket://optra_e312 -E
> 
> I went to http://localhost:631/admin, logged in as root, and printed a
> test page successfully that looks perfect.
> 
> I then tried to print out an simple 3 line ascii (text) file with
> 
>     lpr asciifile
> 
> and the page printed, but the lines are not indented on the left at all:
> the first two characters on each line are not printed and the third character
> starts about 1/4 inch from the left of the page.
> 
> I am able to run "a2ps asciifile" to get readable output, but I'm trying to
> figure out why I can't just run "lpr asciifile".
> 
> I'm guessing that problem has is something to do with a filter, or perhaps
> a bad PPD file for my printer.  I editted /etc/cups/cupsd.conf to set
> "LogLevel debug".
> 
> I restarted cups (with /etc/rc.d/rc.cups restart) and tried printing another
> "lpr asciifile" again.  /var/log/cups/error_log is huge, and I hate to display
> it all.  CUPS does recognize the file as text/plain, and here's the output
> starting with the first occurance of filter:
> D [16/Oct/2005:17:01:59 -0800] print_job: request file type is text/plain.
> ...
> D [16/Oct/2005:17:01:59 -0800] StartJob: filterfds[1] = [ 9 -1 ]
> D [16/Oct/2005:17:01:59 -0800] StartJob: filter = "/usr/lib/cups/filter/texttops"
> D [16/Oct/2005:17:01:59 -0800] StartJob: filterfds[0] = [ 10 11 ]
> D [16/Oct/2005:17:01:59 -0800] start_process("/usr/lib/cups/filter/texttops", 0xbfff01f0, 0xbffef560, 9, 11, 8)
> I [16/Oct/2005:17:01:59 -0800] Started filter /usr/lib/cups/filter/texttops (PID 1537) for job 16.
> D [16/Oct/2005:17:01:59 -0800] StartJob: filter = "/usr/lib/cups/filter/pstops"
> D [16/Oct/2005:17:01:59 -0800] StartJob: filterfds[1] = [ 9 12 ]
> D [16/Oct/2005:17:01:59 -0800] start_process("/usr/lib/cups/filter/pstops", 0xbfff01f0, 0xbffef560, 10, 12, 8)
> I [16/Oct/2005:17:02:00 -0800] Started filter /usr/lib/cups/filter/pstops (PID 1538) for job 16.
> D [16/Oct/2005:17:02:00 -0800] StartJob: filter = "/usr/lib/cups/filter/foomatic-rip"
> D [16/Oct/2005:17:02:00 -0800] StartJob: filterfds[0] = [ 10 11 ]
> D [16/Oct/2005:17:02:00 -0800] start_process("/usr/lib/cups/filter/foomatic-rip", 0xbfff01f0, 0xbffef560, 9, 11, 8)
> I [16/Oct/2005:17:02:00 -0800] Started filter /usr/lib/cups/filter/foomatic-rip (PID 1539) for job 16.
> D [16/Oct/2005:17:02:00 -0800] StartJob: backend = "/usr/lib/cups/backend/socket"
> D [16/Oct/2005:17:02:00 -0800] StartJob: filterfds[1] = [ -1 9 ]
> D [16/Oct/2005:17:02:00 -0800] start_process("/usr/lib/cups/backend/socket", 0xbfff01f0, 0xbffef560, 10, 9, 8)
> I [16/Oct/2005:17:02:00 -0800] Started backend /usr/lib/cups/backend/socket (PID 1540) for job 16.
> D [16/Oct/2005:17:02:00 -0800] ProcessIPPRequest: 7 status_code=0
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Page = 612x792; 0,0 to 612,792
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->num_fonts = 35
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[0] = AvantGarde-Book
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[1] = AvantGarde-BookOblique
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[2] = AvantGarde-Demi
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[3] = AvantGarde-DemiOblique
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[4] = Bookman-Demi
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[5] = Bookman-DemiItalic
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[6] = Bookman-Light
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[7] = Bookman-LightItalic
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[8] = Courier
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[9] = Courier-Bold
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->num_fonts = 35
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[0] = AvantGarde-Book
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[1] = AvantGarde-BookOblique
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[2] = AvantGarde-Demi
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[3] = AvantGarde-DemiOblique
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[4] = Bookman-Demi
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[5] = Bookman-DemiItalic
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[6] = Bookman-Light
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[7] = Bookman-LightItalic
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ppd->fonts[8] = Courier
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Page = 612x792; 0,0 to 612,792
> D [16/Oct/2005:17:02:00 -0800] [Job 16] slowcollate=0, slowduplex=0, sloworder=0
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%BoundingBox: 0 0 612 792
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%Creator: texttops/CUPS v1.1.23
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%CreationDate: Sun 16 Oct 2005 05:02:00 PM AKDT
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%Title: .profile
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%For: root
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%Pages: (atend)
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%DocumentNeededResources: font Courier-Bold
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%+ font Courier
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%DocumentSuppliedResources: procset texttops 1.1 0
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%+ font Courier-Bold
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%+ font Courier
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%EndComments
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%BeginProlog
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%BeginResource: font Courier-Bold
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%CreationDate: Wed Dec 22 1999
> D [16/Oct/2005:17:02:00 -0800] CloseClient: 7
> D [16/Oct/2005:17:02:00 -0800] [Job 16] foomatic-rip version $Revision: 3.48 $ running...
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Parsing PPD file ...
> D [16/Oct/2005:17:02:00 -0800] [Job 16] *cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option ColorSpace
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option PageSize
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option PageRegion
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option ImageableArea
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option PaperDimension
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option InputSlot
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option Duplex
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option Resolution
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option PreFilter
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Added option Font
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Parameter Summary
> D [16/Oct/2005:17:02:00 -0800] [Job 16] -----------------
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Spooler: cups
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Printer: laserjet
> D [16/Oct/2005:17:02:00 -0800] [Job 16] PPD file: /etc/cups/ppd/laserjet.ppd
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Printer model: Lexmark Optra E312 Foomatic/Postscript (recommended)
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Job title: .profile
> D [16/Oct/2005:17:02:00 -0800] [Job 16] File(s) to be printed:
> D [16/Oct/2005:17:02:00 -0800] [Job 16] <STDIN>
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ================================================
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] File: <STDIN>
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] ================================================
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Reading PostScript input ...
> D [16/Oct/2005:17:02:00 -0800] [Job 16] --> This document is DSC-conforming!
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] -----------
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %%BeginProlog
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%EndResource
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%BeginResource: font Courier
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%CreationDate: Wed Dec 22 1999
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%EndResource
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%BeginResource: procset texttops 1.1 0
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%EndResource
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%EndProlog
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%Page: 1 1
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%Page: 1 1
> D [16/Oct/2005:17:02:00 -0800] [Job 16] pw = 612.0, pl = 792.0
> D [16/Oct/2005:17:02:00 -0800] [Job 16] PageLeft = 0.0, PageRight = 612.0
> D [16/Oct/2005:17:02:00 -0800] [Job 16] PageTop = 792.0, PageBottom = 0.0
> D [16/Oct/2005:17:02:00 -0800] [Job 16] PageWidth = 612.0, PageLength = 792.0
> D [16/Oct/2005:17:02:00 -0800] [Job 16] 0 %%Trailer
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Saw Trailer!
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Saw EOF!
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %%EndProlog
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] -----------
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %%BeginSetup
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Inserting PostScript code for CUPS' page accounting
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %%BeginFeature: *PageRegion Letter
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Option: PageRegion=Letter --> Option will be set by PostScript interpreter
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %%BeginFeature: *PreFilter No
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Option: PreFilter=No --> Setting option
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %% FoomaticRIPOptionSetting: PreFilter=No
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Option: PreFilter=No --> Setting option
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %%BeginFeature: *Resolution default
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Option: Resolution=default --> Setting option
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %% FoomaticRIPOptionSetting: Resolution=default
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Option: Resolution=default --> Setting option
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %%BeginFeature: *InputSlot Default
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Option: InputSlot=Default --> Setting option
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %% FoomaticRIPOptionSetting: InputSlot=Default
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Option: InputSlot=Default --> Setting option
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %%BeginFeature: *Duplex None
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Option: Duplex=None --> Setting option
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %% FoomaticRIPOptionSetting: Duplex=None
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Option: Duplex=None --> Setting option
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Found: %%EndSetup
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] -----------
> D [16/Oct/2005:17:02:00 -0800] [Job 16] New page:  1 1
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Inserting option code into "PageSetup" section.
> D [16/Oct/2005:17:02:00 -0800] [Job 16] No page header or page header not DSC-conforming
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Flushing FIFO.D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] Starting renderer
> D [16/Oct/2005:17:02:00 -0800] [Job 16] JCL: <job data>
> D [16/Oct/2005:17:02:00 -0800] [Job 16]
> D [16/Oct/2005:17:02:00 -0800] [Job 16] renderer PID kid4=1542
> D [16/Oct/2005:17:02:00 -0800] [Job 16] renderer command: level=0; /usr/bin/printf "%%!\n%%%% %%%%\n<</ManualFeed false>>setpagedevice\n<</Duplex false>>setpagedevice\n"; if [ $level -gt 0 ]; then if [ $level -lt 99 ]; then level=" -dLanguageLevel=$level"; else level=""; fi; gs -q -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pswrite$level -sOutputFile=- -; else cat; fi
> D [16/Oct/2005:17:02:01 -0800] [Job 16]
> D [16/Oct/2005:17:02:01 -0800] [Job 16] Closing renderer
> D [16/Oct/2005:17:02:01 -0800] [Job 16] tail process done writing data to STDOUT
> D [16/Oct/2005:17:02:01 -0800] [Job 16] KID4 finished
> D [16/Oct/2005:17:02:01 -0800] [Job 16] KID3 exited with status 0
> D [16/Oct/2005:17:02:01 -0800] [Job 16] KID4 exited with status 0
> D [16/Oct/2005:17:02:01 -0800] [Job 16] Renderer exit stat: 0
> D [16/Oct/2005:17:02:01 -0800] [Job 16] KID3 finished
> D [16/Oct/2005:17:02:01 -0800] [Job 16] Renderer process finished
> D [16/Oct/2005:17:02:01 -0800] [Job 16]
> D [16/Oct/2005:17:02:01 -0800] [Job 16] Closing foomatic-rip.
> D [16/Oct/2005:17:02:01 -0800] UpdateJob: job 16, file 0 is complete.
> D [16/Oct/2005:17:02:01 -0800] CancelJob: id = 16
> D [16/Oct/2005:17:02:01 -0800] StopJob: id = 16, force = 0
> D [16/Oct/2005:17:02:01 -0800] StopJob: printer state is 3
> 
> -- Am I supposed to be able to run "lpr asciifile" to print out an ascii file
>     in a readable form (not indented too far to the left)?
> -- What can I do to fix this problem?
> 
> Walt Meier, CUPS novice

Try to get the PPD from the vendor instead of using the one configured for foormatic-rip.

Helge

-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de




More information about the cups mailing list