By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,291 Members | 3,096 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,291 IT Pros & Developers. It's quick & easy.

Cgi: Print Text files with wordwrap!

P: n/a
Okay, I'm writing a cgi program, and I can send files and stuff, but how do
I send text files with word wrap enabled? If a line of text is wider than
the browser, and unsightly scrollbar appears on the bottom. How would I
make it so that the text automatically wraps in the browser without putting
a whole bunch of linebreaks in the text file?

--Walter Huf--
hu****@cobalty.com
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Walter Huf pushed the bounds of literature with:
Okay, I'm writing a cgi program, and I can send files and stuff, but
how do I send text files with word wrap enabled? If a line of text is
wider than the browser, and unsightly scrollbar appears on the bottom.
How would I make it so that the text automatically wraps in the
browser without putting a whole bunch of linebreaks in the text file?

--Walter Huf--
hu****@cobalty.com
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----


If you send plain text, it will be presented exactly how you send it, line
breaks and all.

If you want it to wrap to the browser window, you have to make it look
like HTML. The bare minimum you can get away with is <p> tags where you
want new paragraphs - plus a head and a tail.

--
Dale Strickland-Clark
Riverhall Systems Ltd, www.riverhall.co.uk
Jul 18 '05 #2

P: n/a
"Dale Strickland-Clak" <da**@riverhall.NOSPAM.co.uk> wrote in
news:Xn*********************************@192.168.8 .150:

If you send plain text, it will be presented exactly how you send it,
line breaks and all.

If you want it to wrap to the browser window, you have to make it look
like HTML. The bare minimum you can get away with is <p> tags where
you want new paragraphs - plus a head and a tail.


Awesome, thanks!
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 18 '05 #3

P: n/a
>>>>> "Dale Strickland-Clak" <da**@riverhall.NOSPAM.co.uk> (DS) wrote:

DS> If you send plain text, it will be presented exactly how you send it, line
DS> breaks and all.

DS> If you want it to wrap to the browser window, you have to make it look
DS> like HTML. The bare minimum you can get away with is <p> tags where you
DS> want new paragraphs - plus a head and a tail.

And you should replace < > and & by &lt; &gt; and &amp;
--
Piet van Oostrum <pi**@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.***********@hccnet.nl
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.