LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-22-2015, 05:12 AM   #1
oddo
Member
 
Registered: Sep 2003
Location: Bucharest
Distribution: Slackware *.*
Posts: 36

Rep: Reputation: 15
enscript alignment dependent of font ?


Hi,

I have a weird problem while trying to convert a text file to pdf using enscript :
the text file is the output of
cat file | column -t >> file1
File_name | Size | Date_Time | Checksum_SHA256
file1.xls | 38912 | 2015-08-03T14:12:31Z | ee6715836e74a579eb8cc92dee11e1bd698275f9412e465855b692e85c54cbe2
file 2.doc | 28160 | 2015-08-03T14:11:10Z | 02af41896a1b29bed2341c7c5ceb4b60e37cf7e691ea3ee67f5b71691514f139
file 3.pdf | 7486 | 2015-07-29T16:12:56Z | c54d9d48a3e1368e05672a952320b4fc93c11da195e1ae99738aa9a2b52a0162

if I use Courier font for body the alignment is kept in the pdf file

If I use any other font ( like Times-Roman ) the alignment goes away.

enscript --font=Times-Roman11 --header-font=Times-Roman14 -M A4 --landscape --footer="Some text" --underlay="some other text" --ul-angle=35 --ul-position='+10+0' --ul-font=Calibri130 header -o - | ps2pdf - pv.pdf

Any idea ?
Thank you !
OS- CentOS release 6.7 (Final)
GNU enscript 1.6.4
 
Old 10-22-2015, 11:32 PM   #2
Norseman01
Member
 
Registered: Nov 2012
Posts: 85

Rep: Reputation: Disabled
Quote:
Originally Posted by oddo View Post
Hi,

I have a weird problem while trying to convert a text file to pdf using enscript :
the text file is the output of
cat file | column -t >> file1
File_name | Size | Date_Time | Checksum_SHA256
file1.xls | 38912 | 2015-08-03T14:12:31Z | ee6715836e74a579eb8cc92dee11e1bd698275f9412e465855b692e85c54cbe2
file 2.doc | 28160 | 2015-08-03T14:11:10Z | 02af41896a1b29bed2341c7c5ceb4b60e37cf7e691ea3ee67f5b71691514f139
file 3.pdf | 7486 | 2015-07-29T16:12:56Z | c54d9d48a3e1368e05672a952320b4fc93c11da195e1ae99738aa9a2b52a0162

if I use Courier font for body the alignment is kept in the pdf file

If I use any other font ( like Times-Roman ) the alignment goes away.

enscript --font=Times-Roman11 --header-font=Times-Roman14 -M A4 --landscape --footer="Some text" --underlay="some other text" --ul-angle=35 --ul-position='+10+0' --ul-font=Calibri130 header -o - | ps2pdf - pv.pdf

Any idea ?
Thank you !
OS- CentOS release 6.7 (Final)
GNU enscript 1.6.4
==========================

Long ago, far away Jr. High School days.
The tiny town had its own Newspaper. Line-A-Type! Lead letters needed cleaning every so many sheets, floor needed to be swept..... He gave me a job. He also taught me to use the equipment... If you want "|" aligned, line after line - - - You use fixed fonts AND do not mix type NameA with NameB. Pick one style and that is what goes on the page.

When the IBM Selectric came along, pre-tinned fonts joined the free for all. Most all fonts in use today seem to be variable width - not fixed width.


........M....and N are different widths by I distance.
Don't understand the line above? Think it over. Mull it over. Make your own paper square sheets of same square size and write capitol letters, one per each square, and make several different sentences. Each sheet has to touch both sheets adjacent so spacing of letters inside a given square has to be considered. No changing of size of squares!

So how was it done in the past? The line was set with fixed width font. Then the line had "blanks" (like between words) and spacers ("I" wide but no font - blank) and the line was "beautified" manually. Good luck with programming that!

Some things are simply - "No. Not gonna' happen'"
In a class many moons ago - The "How to handle kids gently" Lady prompted the parents:
Never ask what the kid(s) want for breakfast, say "We are having eggs scrambled with bacon OR sausage. Which do you choose today?".....And that is typesetting!
(Courier is fixed. I like 12pt myself)

Norseman01
 
Old 10-26-2015, 06:53 PM   #3
oddo
Member
 
Registered: Sep 2003
Location: Bucharest
Distribution: Slackware *.*
Posts: 36

Original Poster
Rep: Reputation: 15
Crystal clear, beautiful story, excellent teller ! I choose Courier AND eggs for the kid. Thank you so much !
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
enscript: adjust space between header and body chicagocoyote Linux - Software 0 01-23-2013 08:44 PM
use of special escapes with enscript gato Linux - Software 5 12-06-2011 03:13 AM
[SOLVED] int size is compiler dependent or OS dependent tarunchawla Programming 4 11-30-2011 03:46 AM
escape sequences in enscript lanco Linux - Newbie 1 03-01-2009 02:32 PM
bash command 'enscript' southsibling Linux - Software 0 04-08-2006 09:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:50 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration