LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   "enscript --word-wrap" does not wrap line of text file (https://www.linuxquestions.org/questions/linux-general-1/enscript-word-wrap-does-not-wrap-line-of-text-file-443480/)

powah 05-10-2006 10:37 AM

"enscript --word-wrap" does not wrap line of text file
 
I want to print a text file with line number added.
Therefore I use "enscript -C" to print.
I use "Courier8" which is the smallest font I like.
However, this command does not wrap line of text file.
i.e. some lines are chopped off at the right margin.
$ enscript -C -f "Courier8" --word-wrap xxx
[ 1 pages * 1 copy ] sent to printer

This will wrap line of text file but does not have the line number added.
$ lpr xxx

$ enscript --version
GNU enscript 1.6.1

I use FC3 linux.

Jerre Cope 05-14-2006 10:30 PM

Perhaps it is the printer truncating rather than encript. Have you tried looking at the result with gs or kghostscript? Also, check the page size defaults in enscript.cfg

powah 05-16-2006 09:46 AM

Quote:

Originally Posted by Jerre Cope
Perhaps it is the printer truncating rather than encript. Have you tried looking at the result with gs or kghostscript? Also, check the page size defaults in enscript.cfg

What is the proper command for gs?

$ gs xxx
GNU Ghostscript 7.07 (2003-05-17)
Copyright (C) 2003 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusRomNo9L-Regu font from /usr/share/fonts/default/Type1/n021003l.pfb... 2469820 1100040 1642520 351150 0 done.
Using NimbusRomanNo9L-Regu font for NimbusRomNo9L-Regu.
Loading NimbusSanL-Regu font from /usr/share/fonts/default/Type1/n019003l.pfb... 2844780 1444678 1682712 365686 0 done.
Using NimbusSansL-Regu font for NimbusSanL-Regu.
Error: /stackunderflow in if
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1060/1123(ro)(G)-- --dict:0/20(G)-- --dict:88/200(L)--
Current allocation mode is local
Current file position is 15
GNU Ghostscript 7.07: Unrecoverable error, exit code 1

$ gs -sDEVICE=hp xxx
GNU Ghostscript 7.07 (2003-05-17)
Copyright (C) 2003 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Unknown device: hp
$ gs -sDEVICE=okidata xxx
GNU Ghostscript 7.07 (2003-05-17)
Copyright (C) 2003 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Unknown device: okidata

$ kghostscript xxx
bash: kghostscript: command not found

I found only this related to page size in enscript.cfg:
# Specify whether the PageSize page device option is generated to the
# output.
GeneratePageSize: 1

Jerre Cope 05-16-2006 09:12 PM

gs filename should give you a graphic view of the document.

Use gs --help to explore all of the other commands.


All times are GMT -5. The time now is 01:41 PM.