I have implemented the print option. But I am getting the output result that exceeds the page.
I mean here, to see the entire page we have to use horizontal scroll then only we view all data. the print option will take output only the screen size. how can I print all the data as per original output.
whether we have option to print all in a single page or only we get print as the screen shows.
suggest me please,
Print option prints only as screen size. help me
Moderator: General Moderators
-
avmohankumar
- Forum Newbie
- Posts: 14
- Joined: Fri Jun 08, 2007 7:20 am
I'm thinking your data has line breaks in it that are not recognized because browsers ignore them.
If this is the case you can either:
1) Use the <pre> tag.
or 2) use the php nl2br() function
If that's not the case, then you have extremely long character sequences, in which case wordwrap() would work for you.
If this is the case you can either:
1) Use the <pre> tag.
Code: Select all
<pre>your text here</pre>Code: Select all
echo nl2br($yourText);Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
-
avmohankumar
- Forum Newbie
- Posts: 14
- Joined: Fri Jun 08, 2007 7:20 am
Printing from a web page is a horrible mess. There are a few CSS properties that are useful, but you'll always have very little control over the output. As far as I know there's no way to make a page to print as landscape.
I prefer to use a PDF instead when the user clicks a print button - FPDF is a great library for generating PDF files in PHP, and you have loads of control over the output.
I prefer to use a PDF instead when the user clicks a print button - FPDF is a great library for generating PDF files in PHP, and you have loads of control over the output.