Operating System - Linux
1828625 Members
1561 Online
109983 Solutions
New Discussion

Re: line truncation or wrap when printing web page generated by perl program

 
John Kittel
Trusted Contributor

line truncation or wrap when printing web page generated by perl program

I have a simple perl program to produce a web page. The contents of the web page are a listing of a text file. In the perl program I'm just using the backticks to invoke the linux cat command to list the file contents, and enclosing that within the html tags
 
.

In the browser, long lines display fine, - user can scroll right to view long lines. But if the user prints the page, the long lines get truncated. I need the lines to be wrapped, not truncated, when the page is printed.

Is there a simple way around this? I don't care whether it gets adressed as a browser (IE) setting, a printer page setup change, a different way of generating the web page, etc. Just hoping it can be accomplished with a simple change.

Thanks.
1 REPLY 1
John Kittel
Trusted Contributor

Re: line truncation or wrap when printing web page generated by perl program

I got a reply over in the HP-UX forum. Fixed up the perl program to list the files with Text::Wrap. Works nice.