LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "lp" output missing 2mm at top & left (https://www.linuxquestions.org/questions/linux-newbie-8/lp-output-missing-2mm-at-top-and-left-466419/)

beckwith 07-21-2006 10:03 PM

"lp" output missing 2mm at top & left
 
Using MEPIS, from bash prompt, "lp" prints to my Canon BJC4550, but the top 2mm and left hand 2mm are missing, thus showing only about 1/3 of the top line, and only half of each leftmost character on a line. Seems to print OK from X applications, and also from WinXP. I can't find any alignment adjustments anyway. Thanks in advance.

Tinkster 07-22-2006 03:42 PM

You could look at the cups web-interface and check whether the driver
for your printer (under modify printer) supports margins; if it does,
set them there (e.g. to be 3mm).
If it doesn't maybe use something like a2ps as a filter for your text-files.



Cheers,
Tink

beckwith 07-24-2006 04:34 AM

I don't have a cups web-interface. And since all applications except "bash" seem to work I presume I don't need one. "a2ps" looks promising, but from past experience postscript filters on text that requires non-proportional fonts/usage have not been a success. But I'll give it a go.

Tinkster 07-24-2006 04:38 AM

If you have cups running, you have a web-interface; try
http://localhost:631



Cheers,
Tink

beckwith 07-24-2006 05:17 AM

<<if you have cups running, you have a web-interface; try
http://localhost:631>>
gave:
"Not found on this server".

I tried this:

cat text |a2ps --portrait --chars-per-line=80 --lines-per-page=65 --quiet --borders no --no-header --margin=0|lp -s

good:
1) printed portrait
2) font size ~ as expected
bad:
3) printed a 1 inch top margin
4) printed a 7/16 inch left margin
5) printed only 40 columns/line
But at least I could read it all, *except* (text only 3 lines long)
6) page 2 arrived reading half of "equest 20 canon mumblemumble" (can't read 1/3 of tiny font on page 2)
"ls -s" doesn't work it seems.
7) added " 2>/dev/null" but page 2 still arrived.

Tinkster 07-24-2006 01:16 PM

Hmmm ... maybe Mepis doesn't use cups then, or has the port set
to something else?
Try that one:
lsof|grep cups |grep IP
or, if you don't have lsof installed
netstat -ape|grep cups

Sorry about the other issues, maybe someone who uses a2ps themselves
can help here. My old Optra R has always worked flawlessly :} so I
had no need to use a2ps.



Cheers,
Tink

beckwith 07-25-2006 04:30 AM

Not sure I'm reading the output of "lsof" correctly, but it lists two "cupsd" and what appears to port numbers 15321 & 15322. Neither of which can be connected to.
"ps" shows there is a root process running "cupsd".

Tinkster 07-25-2006 01:34 PM

grep "^Port " /etc/cups/cupsd.conf


Cheers,
Tink

beckwith 07-26-2006 04:40 AM

Hello, thanks for persisting.
/etc/cups/cupsd.conf contains:

#Port 631
Listen *:631

and a bit later in the text

BrowsePort 631.

But http://localhost:631 (and trying the actual machine name)
yields:
Not Found.
The requested resource was not found on this server.

Tinkster 07-26-2006 04:53 AM

You're not also running a firewall that maybe blocks 631?
What happens if you remove the *: and restart CUPS?

I don't know off the top of my head whether * is a valid
wildcard for a hostname in cups, or not ... :}


Cheers,
Tink

beckwith 07-30-2006 03:33 AM

I removed the "*:" from "Listen *:631". The daemon still runs, but
Http://localhost:631" still returns "Not Found".

Tinkster 07-30-2006 01:11 PM

Ok ... I'm running out of ideas :}
Is your CUPS enforcing encryption? Try
https://localhost:631

Is the loop-back interface defined for your box?
Check /etc/hosts for a line
127.0.0.1 localhost


Cheers,
Tink

beckwith 08-02-2006 04:50 AM

Hello, I've already tried that. I doubt encryption is the issue, because the printer does actually *print*. It just isn't aligned correctly from "lp".

spirit receiver 08-02-2006 06:04 AM

Quote:

Originally Posted by beckwith
#Port 631

That line seems to be commented out, here I only get "Port 631". Maybe you want to try this?

beckwith 08-03-2006 05:07 AM

I have uncommented the line, that makes sense from the comments in a rather *large* file consisting of mainly comments. However, what this did was move the
problem from "Not Found" to "Unable to Connect" - tried both http://localhost:631 and http://mymachinename:631 - same result for both.


All times are GMT -5. The time now is 12:39 PM.