You are not logged in.

#1 2011-02-22 11:28:59

Musky
Member
Registered: 2011-02-22
Posts: 8

[BROTHER printer] printing problem (SOLVED)

Hello

I've got a problem with my Brother HL-3040CN. I installed brother-hl3040cn-cupswrapper and brother-hl3040cn-cupswrapper from AUR.


I can set up printer in CUPS and print a page test. I cant print large files, like a pdf with a big graphic (1 page, 9Mo) or a pdf document with 64 pages (815Kio)
BUT I can't print small files, like little .odt file, or a single page of my 64p pdf. I've got allways the same message: "No Pages Found"
Results are the same, either printer is configured with USB or network (lpd://IP/binary_p1)

E [22/Feb/2011:11:47:35 +0100] [Job 896] No pages found!
I [22/Feb/2011:11:47:58 +0100] Started "/usr/lib/cups/cgi-bin/jobs.cgi" (pid=8854)
I [22/Feb/2011:11:48:05 +0100] Started "/usr/lib/cups/cgi-bin/jobs.cgi" (pid=8857)
I [22/Feb/2011:11:48:05 +0100] Saving printers.conf...
I [22/Feb/2011:11:48:05 +0100] Saving job cache file "/var/cache/cups/job.cache"...
I [22/Feb/2011:11:48:05 +0100] [Job 896] Canceled by "root".
W [22/Feb/2011:11:48:05 +0100] [Job 896] l’hôte à distance n’a pas répondu au bout de 300 secondes par un octet d’état de données.

--------------EDIT-----------------
I made some extra test

I took a .odt file, edit it, print into .ps file and try printing with "lpr -P brother test.ps"

All .ps files that are < 259 053 octets don' print --> "No pages found"
All .ps files that are > 259 058 octets prints well


So, what can I do... call brother ?

------------ EDIT 2-------------------
Ok. I tried the following:

echo "test" > test.txt
lpr -P brother test.txt

It works !

I opened this "test.txt" with Kwrite, tried to print --> "No pages found!", and of course, no printing.....

--------- SOLVED ---------

Solved for me by installing a2ps, that install psutils. Don't know which one is really important, but that works

-------------------------------------

Last edited by Musky (2011-02-27 15:43:56)

Offline

#2 2011-02-23 12:47:44

stopstop
Member
From: Belgium
Registered: 2011-02-22
Posts: 13
Website

Re: [BROTHER printer] printing problem (SOLVED)

Same problem here with the hl-2250DN. He logs no errors, but only prints large files.

strange ...

Offline

#3 2011-02-24 13:08:15

Musky
Member
Registered: 2011-02-22
Posts: 8

Re: [BROTHER printer] printing problem (SOLVED)

Ok. I tried the following:

echo "test" > test.txt
lpr -P brother test.txt

It works !

I opened this "test.txt" with Kwrite, tried to print --> "No pages found!", and of course, no printing.....

Offline

#4 2011-02-24 19:55:27

stopstop
Member
From: Belgium
Registered: 2011-02-22
Posts: 13
Website

Re: [BROTHER printer] printing problem (SOLVED)

Hi,

thank you for the investigation. Our problems are definitely related. I installed a2ps and psutils, like you said, and I got some action going on.

echo "test" > test.txt
lpr -P brother test.txt

Works for me as well from command line, as they don`t with a graphical texteditor.

Well, they work from a graphical texteditor (or pdfreader), but now they print the PS in pure text,

With pages full of:
%%Creator:
%%CreationDate:
%%DocumentData: Clean7Bit
...

Last edited by stopstop (2011-02-24 20:52:03)

Offline

#5 2011-02-25 07:34:35

Musky
Member
Registered: 2011-02-22
Posts: 8

Re: [BROTHER printer] printing problem (SOLVED)

Well. I think your problem will be outside my knowledge. Maybe something that can help:

My /etc/cups/printers/conf

<DefaultPrinter laser>
Info Brother HL-3040CN
MakeModel Brother HL3040CN CUPS
DeviceURI lpd://192.168.1.10/binary_p1
State Idle
StateTime 1298556796
Type 8433740
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-postscript 0 brlpdwrapperhl3040cn
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
Attribute marker-colors \#000000,#00FFFF,#FFFF00,#FF00FF,none,none,none,none,none,none
Attribute marker-levels -1,-1,-1,-1,-1,99,99,99,99,99
Attribute marker-names Black Toner Cartridge,Cyan Toner Cartridge,Magenta Toner Cartridge,Yellow Toner Cartridge,Waste Toner Box,Belt Unit,Black Drum Unit,Cyan Drum Unit,Magenta Drum Unit,Yellow Drum Unit
Attribute marker-types toner,toner,toner,toner,wasteToner,other,opc,opc,opc,opc
Attribute marker-change-time 1298556796
</Printer>

If your printer works with large file, i guess that driver is properly installed. I don't find any pkg relative to hl-2250DN in AUR, so you must have installed by hand. Maybe you can try to edit pkgbuilds (like the two for 3040CN)....

Offline

#6 2011-02-25 15:15:07

wazow
Member
From: Europe
Registered: 2008-11-11
Posts: 39

Re: [BROTHER printer] printing problem (SOLVED)

I have the same problem on another brother printer DCP-375CW.  I have newest a2ps, psutils and the driver from AUR.  Still to no effect.
Some files do print (for example cups test page).  But others don't.  This includes pdfs displayed from evince, which should be normally very robust.  So I think you are right that the problem is somewhere in the driver, or the conversion chain.  But I do not know where.

Help! This is freaking annoyyyyyiing....

I have a vague recollection that this has been caused by an update about 10 days ago.

Offline

#7 2011-02-25 19:32:33

Musky
Member
Registered: 2011-02-22
Posts: 8

Re: [BROTHER printer] printing problem (SOLVED)

I changed this message title. My problem is solved, but yours not and seem to be connected.

Maybe you can ask Brother linux support :
linuxsupport at brother.com

Offline

#8 2011-02-25 21:39:56

stopstop
Member
From: Belgium
Registered: 2011-02-22
Posts: 13
Website

Re: [BROTHER printer] printing problem (SOLVED)

I installed the drivers from the brother website (from the rpm, had to change some paths, succeeded as printing large files and testpages work).

I`ve contacted Brother, hope they reply soon. In the meanwhile I`ll keep searching. You have no idea how many paper I`ve wasted by now ...

Maybe I should write a filter that puts a large white image in the background big_smile

Offline

#9 2011-02-25 23:34:58

wazow
Member
From: Europe
Registered: 2008-11-11
Posts: 39

Re: [BROTHER printer] printing problem (SOLVED)

I discovered that the driver page on AUR states foomatic-filters and hal-cups-utils as dependencies.  But these were somehow mysteriously not installed on my machine.  I installed them now, but it is night and the printer is in the room where my wife sleeps - so I will have to test tomorrow.  I will keep you posted.

Offline

#10 2011-02-26 08:58:56

wazow
Member
From: Europe
Registered: 2008-11-11
Posts: 39

Re: [BROTHER printer] printing problem (SOLVED)

wazow wrote:

I discovered that the driver page on AUR states foomatic-filters and hal-cups-utils as dependencies.  But these were somehow mysteriously not installed on my machine.  I installed them now, but it is night and the printer is in the room where my wife sleeps - so I will have to test tomorrow.  I will keep you posted.

grrrr ... installing these filters (and restarting cups) did not help.  Still 'No pages found!".  I have no further ideas.

Offline

#11 2011-02-26 12:18:09

Musky
Member
Registered: 2011-02-22
Posts: 8

Re: [BROTHER printer] printing problem (SOLVED)

I dont think this is related to yours problems. It's about driver installation, and, like wazow said "the problem is somewhere in the driver, or the conversion chain"....
But, who knows ? https://bbs.archlinux.org/viewtopic.php … 88#p267069

Offline

#12 2011-02-26 12:33:09

briest
Member
From: Katowice, PL
Registered: 2006-05-04
Posts: 468

Re: [BROTHER printer] printing problem (SOLVED)

On my DCP-135c "no pages found" was usually (not always, though) related to brcupsconfpt1 crashing for some documents. I have found some pathes for it and built a new binary -- since then my printer works most of the time (for some reason, printing from gqview still fails, but the same images print fine with gimp or gthumb). Check your messages.log for brcupsconfpt1 segfaulting -- if you find such events, the patches may be useful.

I cannot find at the moment where exactly did I took them from (some Ubuntu forum, I believe), but they are short and simple enough to be put here inline:

--- brcupsconfig.c.orig    2010-03-13 11:55:21.936155172 -0800
+++ brcupsconfig.c    2010-03-13 12:01:09.503289890 -0800
@@ -639,11 +639,11 @@
 
     if((p = strstr(input,MEDIAEQ1)) != NULL)
     {
-        strcpy(media_command,p+strlen(MEDIAEQ1));
+        strncpy(media_command,p+strlen(MEDIAEQ1),sizeof(media_command));
     }
     else if((p = strstr(input,MEDIAEQ2)) != NULL)
     {
-        strcpy(media_command,p+strlen(MEDIAEQ2));
+        strncpy(media_command,p+strlen(MEDIAEQ2),sizeof(media_command));
     }
     else
     {

and

--- brcupsconfig.c.orig    2010-03-13 11:55:21.936155172 -0800
+++ brcupsconfig.c    2010-03-13 14:45:14.434783072 -0800
@@ -415,9 +415,9 @@
   char  value[100];
   //DEBUGPRINT1("   add_command_list_brcommand:start %s\n",command);
 
-  strncpy(option,command,sizeof(option)-1);
+  strncpy(option,command,sizeof(option));
 
-  option[sizeof(option)] = 0;
+  option[sizeof(option)-1] = 0;
 
 
 

You shall find brcupsconfpt1 source inside one of the tarballs at Brother printer drivers page.

Offline

#13 2011-02-26 18:15:17

stopstop
Member
From: Belgium
Registered: 2011-02-22
Posts: 13
Website

Re: [BROTHER printer] printing problem (SOLVED)

I solved my problem. Finally ...

After debugging filterHL2250DN (/usr/local/Brother/Printer/HL2250DN/lpd) it appeared that 'file' is not recognizing the file correct.
I outputted the 'input' by changing

cat > $INPUT_TEMP1

to

cat|tee /tmp/testfile >$input_TEMP1

The resulting file was recognized as a 'data'-file by 'file' .

file /tmp/testfile

I downgraded my 'file' to version 5.04 and hopla ...

Problem solved.The printer prints everything ...

Offline

#14 2011-02-27 09:09:48

wazow
Member
From: Europe
Registered: 2008-11-11
Posts: 39

Re: [BROTHER printer] printing problem (SOLVED)

stopstop wrote:

I downgraded my 'file' to version 5.04 and hopla ...

I did the same, downgraded to file-5.04-3 and it works! thanks a lot.  Now the question is where should we report a bug?  Is this a bug in file or in cups, or in the driver?

Offline

#15 2011-02-27 09:37:38

stopstop
Member
From: Belgium
Registered: 2011-02-22
Posts: 13
Website

Re: [BROTHER printer] printing problem (SOLVED)

I think the problem is in file. I looked at the outputted PS-file, and I don`t see a problem. I tried changing the magicfile, but there was a recent versionchange and the old magicfile was not compatible with the new file.

Offline

#16 2011-02-27 12:12:59

wazow
Member
From: Europe
Registered: 2008-11-11
Posts: 39

Re: [BROTHER printer] printing problem (SOLVED)

Would be cool to find a small PS file that is misinterpreted by "file" - then we have a bug report smile

Offline

#17 2011-02-27 15:43:15

Musky
Member
Registered: 2011-02-22
Posts: 8

Re: [BROTHER printer] printing problem (SOLVED)

I've got file-5.05-1, and it's working for me so is it a problem with file or with the filter ?

As I said, that's out of my knowledge. If you want to search forward, this is my filter hl3040cn

PRINTER="hl3040cn"
PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g')

BR_PRT_PATH=/usr/share/brother/Printer/${PRINTER}
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | eval sed 's/PRINTER/"$PRINTER_TMP"/'`
PAPER_INF=$BR_PRT_PATH/inf/paperinfij2
PSCONV=$BR_PRT_PATH/lpd/psconvertij2
BRCONV=$BR_PRT_PATH/lpd/br${PRINTER}filter

RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | eval sed 's/PRINTER/"$PRINTER_TMP"/'`

INPUT_TEMP=`mktemp /tmp/br_input.XXXXXX`
cat > $INPUT_TEMP

FILE_TYPE=`file $INPUT_TEMP | sed -e 's/^.*:[ ]*//' -e 's/[ ].*//'`

#if [ "$FILE_TYPE" = "PostScript" -o "$FILE_TYPE" = "PDF" ] ; then
        PSCONV_OP="$PAPER_INF $RCFILE"
        BRCONV_OP="-pi $PAPER_INF -rc $RCFILE"
#fi

trap '' 2
case "$FILE_TYPE" in
        "PostScript")
                eval cat $INPUT_TEMP | $PSCONV $PSCONV_OP | $BRCONV $BRCONV_OP
                RET=$?
                ;;
        "PDF")
                PS_TEMP=`mktemp /tmp/br_ps.XXXXXX`
                pdf2ps $INPUT_TEMP $PS_TEMP
                eval cat $PS_TEMP | $PSCONV $PSCONV_OP | $BRCONV $BRCONV_OP
                RET=$?
                rm -f $PS_TEMP
                ;;
        * )
                A2PS_OP="--output=- -q -1 --no-header --borders no"
                eval cat $INPUT_TEMP | a2ps $A2PS_OP | $PSCONV $PSCONV_OP | $BRCONV $BRCONV_OP
                RET=$?
                ;;
esac
trap 2

rm -f $INPUT_TEMP

exit $RET

I mark the thread as solved.

Last edited by Musky (2011-02-27 15:45:47)

Offline

#18 2011-04-19 18:38:50

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: [BROTHER printer] printing problem (SOLVED)

I am now still continuously having problems with my Brother MFC-465CN at each system upgrade. System upgrades are now updating "file" and each time the new version of "file" breaks printing from any GUI app (although lpr works). I have been using "downgrade" to get the older version of file.

So I would like to know if anyone else still encounters this problem. I notice that the Brother drivers ahve not been updated for 2-3 years so I doubt re-installing the drivers is going to make any difference. Any ideas?


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#19 2011-04-20 08:27:32

wazow
Member
From: Europe
Registered: 2008-11-11
Posts: 39

Re: [BROTHER printer] printing problem (SOLVED)

lagagnon wrote:

I am now still continuously having problems with my Brother MFC-465CN at each system upgrade. System upgrades are now updating "file" and each time the new version of "file" breaks printing from any GUI app (although lpr works). I have been using "downgrade" to get the older version of file.

So I would like to know if anyone else still encounters this problem. I notice that the Brother drivers ahve not been updated for 2-3 years so I doubt re-installing the drivers is going to make any difference. Any ideas?

I still face the same problem on my DCP-375CW (have just downgraded to file-5.03-1 *again*, sigh).

Offline

#20 2011-04-20 13:45:29

stopstop
Member
From: Belgium
Registered: 2011-02-22
Posts: 13
Website

Re: [BROTHER printer] printing problem (SOLVED)

wazow wrote:
lagagnon wrote:

I am now still continuously having problems with my Brother MFC-465CN at each system upgrade. System upgrades are now updating "file" and each time the new version of "file" breaks printing from any GUI app (although lpr works). I have been using "downgrade" to get the older version of file.

So I would like to know if anyone else still encounters this problem. I notice that the Brother drivers ahve not been updated for 2-3 years so I doubt re-installing the drivers is going to make any difference. Any ideas?

I still face the same problem on my DCP-375CW (have just downgraded to file-5.03-1 *again*, sigh).

Indeed a nasty problem ...
I still believe it`s a problem with file, so a good bugreport should be the way to go.
It`s easy to create a PS-file that is faulty interpreted by file, but where to post ?

Offline

#21 2011-04-25 16:40:03

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: [BROTHER printer] printing problem (SOLVED)

Solution found! It appears as though the latest (past 3 months or so) version of the "file" package break the ability of many Brother printers and CUPS to print from GUI applications. The solution is to ensure the "a2ps" package is installed. I do not understand why but it works for me.


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#22 2011-04-25 18:45:41

wazow
Member
From: Europe
Registered: 2008-11-11
Posts: 39

Re: [BROTHER printer] printing problem (SOLVED)

lagagnon wrote:

Solution found! It appears as though the latest (past 3 months or so) version of the "file" package break the ability of many Brother printers and CUPS to print from GUI applications. The solution is to ensure the "a2ps" package is installed. I do not understand why but it works for me.

this is a bit fishy - I have a2ps installed (for ages now) and this does not seem to help for me ...

Offline

#23 2011-04-26 10:21:25

stopstop
Member
From: Belgium
Registered: 2011-02-22
Posts: 13
Website

Re: [BROTHER printer] printing problem (SOLVED)

wazow wrote:
lagagnon wrote:

Solution found! It appears as though the latest (past 3 months or so) version of the "file" package break the ability of many Brother printers and CUPS to print from GUI applications. The solution is to ensure the "a2ps" package is installed. I do not understand why but it works for me.

this is a bit fishy - I have a2ps installed (for ages now) and this does not seem to help for me ...

Didn`t help me either ... Was one of the first things I tried ...

Offline

#24 2011-05-04 15:42:25

airencracken
Member
From: California
Registered: 2010-04-17
Posts: 23

Re: [BROTHER printer] printing problem (SOLVED)

Yep. Having the same problem myself only prints the ps text. hmm

Offline

#25 2011-05-20 12:06:35

jdbrody
Member
Registered: 2011-05-20
Posts: 1

Re: [BROTHER printer] printing problem (SOLVED)

For what it's worth, I've been having the same problem on my gentoo box.  It seems that one of the CUPS filters (pstops) appends 0x0a04 to postscript files; this causes file to break, and thus the Brother filters think they're getting raw text that should be printed.

I've filed a bug report at bugs.gw.com.  A simple workaround would be to write a wrapper for pstops that strips out those final two bytes.

Offline

Board footer

Powered by FluxBB