[opensuse-kde] Text file won't print

Why should a simple text file not print? The file in question is a perl script, about 4kB in size. When I load it into kate or kwrite, and try to print it out, all the expected print dialogs open, but after clicking the 'Print' button, nothing happens. CUPS (localhost:631) doesn't even show the job arriving in the print spool. OTOH, other textfiles will print from kate/kwrite, and the perl script mentioned above _will_ print from LibreOffice writer. Permissions on the file are 644. I am the owner. It seems that only KDE apps are affected. I'm using openSUSE 12.1 and KDE 4.8.2 Bob -- Bob Williams System: Linux 3.1.9-1.4-desktop Distro: openSUSE 12.1 (x86_64) with KDE Development Platform: 4.8.2 (4.8.2) "release 491" Uptime: 06:00am up 22 days 12:02, 5 users, load average: 0.22, 0.16, 0.10 -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

On 2012/04/20 17:01 (GMT+0100) Bob Williams composed:
Why should a simple text file not print?
The file in question is a perl script, about 4kB in size. When I load it into kate or kwrite, and try to print it out, all the expected print dialogs open, but after clicking the 'Print' button, nothing happens.
CUPS (localhost:631) doesn't even show the job arriving in the print spool.
OTOH, other textfiles will print from kate/kwrite, and the perl script mentioned above _will_ print from LibreOffice writer.
Permissions on the file are 644. I am the owner.
It seems that only KDE apps are affected. I'm using openSUSE 12.1 and KDE 4.8.2
Interesting. I have a near opposite problem in 11.4/KDE3. Some apps print OK, others generate printer errors. Firefox can print plain text files, but causes printer errors trying to print web pages. YaST test pages only work if there has been no previous error since starting CUPS with it's cache & tmpfiles removed, or remove and recreate the entire printer in YaST. I never had printing trouble with 11.2, but for a long time after 11.3 was released, all printing was impossible in 11.3+ (and the then current Fedora and Mandriva) until Canon released a new driver. I even filed a (WONTFIX) bug about it. https://bugzilla.novell.com/show_bug.cgi?id=683476 -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

Bob Williams said the following on 04/20/2012 12:01 PM:
Why should a simple text file not print?
The file in question is a perl script, about 4kB in size. When I load it into kate or kwrite, and try to print it out, all the expected print dialogs open, but after clicking the 'Print' button, nothing happens.
CUPS (localhost:631) doesn't even show the job arriving in the print spool.
OTOH, other textfiles will print from kate/kwrite, and the perl script mentioned above _will_ print from LibreOffice writer.
Permissions on the file are 644. I am the owner.
It seems that only KDE apps are affected. I'm using openSUSE 12.1 and KDE 4.8.2
My situation is quite different; I have a printer server machine on the network and the printer is on a parallel port on that machine; so CUPS is at server:631 and I can print from any machine on the network. That includes anyone who brings in a windows machine and connects (directly or wifi) if I fire up samba :-) But then I found it wouldn't print! Drilling down I found that for some obscure reason the printer server started with crw------- 1 root lp 6, 0 2012-04-20 07:09 /dev/lp0 So I got that fixed to crw-rw---- 1 root lp 6, 0 2012-04-20 07:09 /dev/lp0 Still no joy. Why? Well cups was running with 'lpadmin' not 'lp' Or was it 'sys'? Check the /etc/cups/cupsd.conf Take a look at how you are submitting jobs. Is it to the xinetd server? In which case check /etc/xinetd.d/cups-lpd -- "Combinatorics -- how to count without counting." - Cassablanca -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-04-20 18:29, Anton Aylward wrote:
But then I found it wouldn't print!
Drilling down I found that for some obscure reason the printer server started with
crw------- 1 root lp 6, 0 2012-04-20 07:09 /dev/lp0
So I got that fixed to
crw-rw---- 1 root lp 6, 0 2012-04-20 07:09 /dev/lp0
Still no joy.
No, because that would be for printing directly, without cups. That's not the print server.
Take a look at how you are submitting jobs. Is it to the xinetd server? In which case check /etc/xinetd.d/cups-lpd
No, that is not related to his problem, he can print fine from other tools. His is related to how kate/kwrite converts a perl script to printable data. It is probably applying some nice printing rules and failing. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk+RsjcACgkQIvFNjefEBxoFVgCfbHcW9PQlBOx7F2Qf5vTdOKxs FZwAnR+8RDDZdcXRCQsSf08uSnUT44CX =KH+v -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

On Fri, 20 Apr 2012 21:00, Carlos E. R. <robin.listas@...> wrote:
On 2012-04-20 18:29, Anton Aylward wrote:
But then I found it wouldn't print!
Drilling down I found that for some obscure reason the printer server started with
crw------- 1 root lp 6, 0 2012-04-20 07:09 /dev/lp0
So I got that fixed to
crw-rw---- 1 root lp 6, 0 2012-04-20 07:09 /dev/lp0
Still no joy.
No, because that would be for printing directly, without cups. That's not the print server.
Take a look at how you are submitting jobs. Is it to the xinetd server? In which case check /etc/xinetd.d/cups-lpd
No, that is not related to his problem, he can print fine from other tools. His is related to how kate/kwrite converts a perl script to printable data. It is probably applying some nice printing rules and failing.
Hmmm, if you have no need for the 'pretty-printing', you could disable syntax-highlightning, at least for printing. Another test would be a normal text file, e.g. multi-paragraph plain english/spanish/etc and trying to print that. If you want syntax 'pretty-printing', try a2ps from the command-line and pipe the result to the printer-cue / lpr That way you could narrow down the cause some. Also a try could be 'printing' to a (postscript-)file and viewing that with a ps viewer (okular, e.g.) I hope this gives you a few hint to get a step further to the cause of the problem. - Yamaban. -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

Hi Guys, Just got back from babysitting the grandchildren, to find all your helpful ideas. On 20/04/12 20:27, Yamaban wrote:
On Fri, 20 Apr 2012 21:00, Carlos E. R. <robin.listas@...> wrote:
On 2012-04-20 18:29, Anton Aylward wrote:
But then I found it wouldn't print!
Drilling down I found that for some obscure reason the printer server started with
crw------- 1 root lp 6, 0 2012-04-20 07:09 /dev/lp0
So I got that fixed to
crw-rw---- 1 root lp 6, 0 2012-04-20 07:09 /dev/lp0
Still no joy.
No, because that would be for printing directly, without cups. That's not the print server.
Take a look at how you are submitting jobs. Is it to the xinetd server? In which case check /etc/xinetd.d/cups-lpd
No, that is not related to his problem, he can print fine from other tools. His is related to how kate/kwrite converts a perl script to printable data. It is probably applying some nice printing rules and failing.
I think that's closer to the problem. (The printer is a USB HP Photosmart 8150 attached to my router, which has a dedicated printer port at lpd:/192.168.1.1:p1) The offending file won't print with syntax highlighting turned off. I've found another perl script which won't print, but equally, there's one in the same folder which will print from kate. Surely, they are just text files, so the fact they contain some perl is irrelevant.
Hmmm, if you have no need for the 'pretty-printing', you could disable syntax-highlightning, at least for printing.
See above.
Another test would be a normal text file, e.g. multi-paragraph plain english/spanish/etc and trying to print that.
That works.
If you want syntax 'pretty-printing', try a2ps from the command-line and pipe the result to the printer-cue / lpr
That way you could narrow down the cause some.
Also a try could be 'printing' to a (postscript-)file and viewing that with a ps viewer (okular, e.g.)
I hope this gives you a few hint to get a step further to the cause of the problem.
- Yamaban.
I'll try these ideas tomorrow. The grandkids have worn me out ;) Bob -- Bob Williams System: Linux 3.1.9-1.4-desktop Distro: openSUSE 12.1 (x86_64) with KDE Development Platform: 4.8.2 (4.8.2) "release 491" Uptime: 18:00pm up 1:37, 3 users, load average: 0.09, 0.11, 0.12 -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-04-21 00:38, Bob Williams wrote:
The offending file won't print with syntax highlighting turned off. I've found another perl script which won't print, but equally, there's one in the same folder which will print from kate. Surely, they are just text files, so the fact they contain some perl is irrelevant.
Should be... but is not, apparently. Something is trying to do something clever. For example, how should a line longer than the page width be treated, if the file is in perl? Not pretty printing, but something is doing something, so... The fact that some perl files fail point to some filtering. Try to print to file, it avoids cups. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk+R7TgACgkQIvFNjefEBxqQcACfWO+Tu1Aw3rwrb1mE6+tOUwqU w+4AoMtS0ZRhh7wwIN0dD7brrimvkr48 =g4OO -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

On 21/04/12 00:11, Carlos E. R. wrote:
On 2012-04-21 00:38, Bob Williams wrote:
The offending file won't print with syntax highlighting turned off. I've found another perl script which won't print, but equally, there's one in the same folder which will print from kate. Surely, they are just text files, so the fact they contain some perl is irrelevant.
Should be... but is not, apparently. Something is trying to do something clever. For example, how should a line longer than the page width be treated, if the file is in perl? Not pretty printing, but something is doing something, so... The fact that some perl files fail point to some filtering.
Line length does seem to be the problem. When I insert carriage returns to split long lines into two, the resulting file prints OK. Obviously, 'Dynamic Word Wrap' applies only to the screen display. Syntax highlighting on/off makes no difference, either.
Try to print to file, it avoids cups.
When I printed to file, pdf, Okular displayed the file on screen very nicely, but also could not print it out. Print preview just showed the right hand ends of a few lines. My reason for wanting to print out this script is to aid my learning of perl. Sometimes I prefer to look at a printout that I can draw lines on, doodle my thoughts etc. Bob -- Bob Williams System: Linux 3.1.9-1.4-desktop Distro: openSUSE 12.1 (x86_64) with KDE Development Platform: 4.8.2 (4.8.2) "release 491" Uptime: 06:00am up 1 day 13:37, 3 users, load average: 0.67, 0.63, 0.60 -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-04-22 10:55, Bob Williams wrote:
My reason for wanting to print out this script is to aid my learning of perl. Sometimes I prefer to look at a printout that I can draw lines on, doodle my thoughts etc.
Well, you have to print it from non kde tools, or from the command line. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk+T4FcACgkQIvFNjefEBxpblwCggVHd7x3IoDjY5vF5WrPQ5W9N 1tcAoNbdRg0uSFEbthkiIYP/Zuf+n4EV =Y+C0 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

Carlos E. R. said the following on 04/22/2012 06:41 AM:
On 2012-04-22 10:55, Bob Williams wrote:
My reason for wanting to print out this script is to aid my learning of perl. Sometimes I prefer to look at a printout that I can draw lines on, doodle my thoughts etc.
Well, you have to print it from non kde tools, or from the command line.
If you are printing from the command line then you should have a look at 'enscript' which can pretty-print/highlight a number of types of source code and convert to the postscript format that the Linux print system uses. This is what I used to pretty-print Ruby code when I was learning that language. -- Entropy isn't what it used to be. -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

On 22/04/12 12:02, Anton Aylward wrote:
Carlos E. R. said the following on 04/22/2012 06:41 AM:
On 2012-04-22 10:55, Bob Williams wrote:
My reason for wanting to print out this script is to aid my learning of perl. Sometimes I prefer to look at a printout that I can draw lines on, doodle my thoughts etc.
Well, you have to print it from non kde tools, or from the command line.
If you are printing from the command line then you should have a look at 'enscript' which can pretty-print/highlight a number of types of source code and convert to the postscript format that the Linux print system uses.
This is what I used to pretty-print Ruby code when I was learning that language.
Thanks, Anton. I'll take a look at enscript [I have the manpage open now :)] Bob -- Bob Williams System: Linux 3.1.9-1.4-desktop Distro: openSUSE 12.1 (x86_64) with KDE Development Platform: 4.8.2 (4.8.2) "release 491" Uptime: 06:00am up 1 day 13:37, 3 users, load average: 0.67, 0.63, 0.60 -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

On 22/04/12 11:41, Carlos E. R. wrote:
On 2012-04-22 10:55, Bob Williams wrote:
My reason for wanting to print out this script is to aid my learning of perl. Sometimes I prefer to look at a printout that I can draw lines on, doodle my thoughts etc.
Well, you have to print it from non kde tools, or from the command line.
How frustrating that I have to use Adobe Reader, rather than opensource software :( Bob -- Bob Williams System: Linux 3.1.9-1.4-desktop Distro: openSUSE 12.1 (x86_64) with KDE Development Platform: 4.8.2 (4.8.2) "release 491" Uptime: 06:00am up 1 day 13:37, 3 users, load average: 0.67, 0.63, 0.60 -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-04-22 15:29, Bob Williams wrote:
On 22/04/12 11:41, Carlos E. R. wrote:
Well, you have to print it from non kde tools, or from the command line.
How frustrating that I have to use Adobe Reader, rather than opensource software :(
No, there are other tools. For example, gv. - -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk+UC44ACgkQIvFNjefEBxp4awCeMmKelGbwsvitjx2sc9jOnw4D 8MAAoLc8Fv2dD4sFiJt4hG728tm95oKg =1CYu -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org

Bob Williams said the following on 04/22/2012 09:29 AM:
On 22/04/12 11:41, Carlos E. R. wrote:
On 2012-04-22 10:55, Bob Williams wrote:
My reason for wanting to print out this script is to aid my learning of perl. Sometimes I prefer to look at a printout that I can draw lines on, doodle my thoughts etc.
Well, you have to print it from non kde tools, or from the command line.
How frustrating that I have to use Adobe Reader, rather than opensource software :(
There *are* open source tools which will render PDF (and manipulate PDF files). On top of everything I try to use FoxIt http://www.foxitsoftware.com/Secure_PDF_Reader/ http://www.foxitsoftware.com/pdf/desklinux/ Its not FOSS and it won't render some fringe cases but its lightweight and VERY fast though it has shortcomings (like lack of configuration, inability to remember last save directory...) Have you tried: okular inkscape evince (and gpdf) xpdf xournal safari - has support for PDF and one day, sumatra http://forums.fofou.org/sumatrapdf/topic?id=2600327 -- Aviation is not so much a profession as it is a disease. -- To unsubscribe, e-mail: opensuse-kde+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde+owner@opensuse.org
participants (5)
-
Anton Aylward
-
Bob Williams
-
Carlos E. R.
-
Felix Miata
-
Yamaban