LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-10-2006, 10:37 AM   #1
powah
Member
 
Registered: Mar 2005
Distribution: FC, Gentoo
Posts: 276

Rep: Reputation: 30
"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.
 
Old 05-14-2006, 10:30 PM   #2
Jerre Cope
Member
 
Registered: Oct 2003
Location: Texas (central)
Distribution: ubuntu,Slackware,knoppix
Posts: 323

Rep: Reputation: 37
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
 
Old 05-16-2006, 09:46 AM   #3
powah
Member
 
Registered: Mar 2005
Distribution: FC, Gentoo
Posts: 276

Original Poster
Rep: Reputation: 30
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
 
Old 05-16-2006, 09:12 PM   #4
Jerre Cope
Member
 
Registered: Oct 2003
Location: Texas (central)
Distribution: ubuntu,Slackware,knoppix
Posts: 323

Rep: Reputation: 37
gs filename should give you a graphic view of the document.

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using sed to remove word wrap Harpune Linux - Software 2 03-02-2009 06:53 PM
restricted word wrap with Kontact (Kmail) blastradius Linux - Software 2 10-21-2005 07:39 AM
Microsoft Word won't word wrap Micro420 General 1 06-13-2005 04:36 PM
word wrap in java linux_ub Programming 3 08-11-2004 01:16 AM
Word Wrap Squall LQ Suggestions & Feedback 4 02-03-2004 03:25 PM


All times are GMT -5. The time now is 09:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration