Results 1 to 6 of 6
Hi,
I wanna a print a file in Liunx in condensed mode .
is there any command that will support this
Thanks
Venkat...
- 10-27-2009 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 3
printing a file in Linux in condensed mode
Hi,
I wanna a print a file in Liunx in condensed mode .
is there any command that will support this
Thanks
Venkat
- 10-28-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Please explain. Do you mean that you want to print a compressed file, such as a gzip'd file?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 11-06-2009 #3Just Joined!
- Join Date
- Oct 2009
- Posts
- 3
Hi,
Thanks for your prompt reply ..
I am trying to print a text while which has 170 characters per line.But My TVS 245 dot matrix printer supports 132 columns only . But there is one option in DOT matrix printer which is Condensed mode . when I set this option in Printer settings It is compressing the characters (not the file) and printing the file . So in output there would not be any wrapped lines . But I want to set this option from my CUPS command lpr .
please let me know is there any option in lpr or lp commands
Thanks
Venkat
- 11-06-2009 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
If you know what the escape sequence is to enable/disable compressed print for the printer, then you should be able to either add that to the beginning/end of the file in question, or tell LPR to send that data to the printer before/after printing the actual file. I haven't done much with LPR for years so I don't remember exactly how to do that.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 11-09-2009 #5Just Joined!
- Join Date
- Oct 2009
- Posts
- 3
Hi,
Thanks for your prompt response .
I have written sample java programe which will send a data to Printer using java.awt.print API . Unicode for new line \u000A and form feed \u000C . even If I am sending these caharacters from Java program to print file It is treating these characters as Normal Characters not as a escape characters .
I tried lpr command as follows .
cat data6.txt > lpr -o Media=A4 -o fit-to-page -o columns=132
But here is no option to specify Font type .
I specified columns =132 somehow this is working fine But the font is not clear.
Please let me know If you have any idea about lpr or any CUPS command line options
Thanks
Venkat
- 11-09-2009 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
In RHEL/CentOS the print manager allows you to change the options for the text filter it uses. Under the covers it uses the enscript system command and one of the options is to change the number of columns. That modifies the enscript command to include the argument --columns=%value where %value is the number of columns. The thing I'm not sure about is whether or not that is the number of character columns, or controls the text flow to allow 2 or more columns like a book or magazine might have.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
