Solved

Printer can not print large html table having large no of columns, some data is not getting printed

Posted on 2003-10-21
10
743 Views
Last Modified: 2008-01-16
HI


I am having a  page in which I am showing large data  as an HTML table
That table has almost 13 to 14 columns, so while printing,
 that page spans  to more than one page.
All data can not fit into one page and  remaining data is lost
and is not getting printed.
Is there any silution to make this remaining data printed on another page or  to get all this data get printed...
THis is very urgent requirement...


Can you please help me as soon as possible


Thanks  in anticipation

Regards
ssdanu
0
Comment
Question by:ssdanu
10 Comments
 
LVL 14

Accepted Solution

by:
p_partha earned 168 total points
ID: 9594322
Hi
It shd print , there shd not be any issues... but anyways you can try this method given by ZVONKO
<html>
<head>
<script>
function printContenet(){
pw=window.open();
pw.document.write('<body>'+
document.getElementById('Content').innerHTML+
'<sc'+'ript>window.setTimeout("window.close()",3000)</scr'+'ipt>'+
'</body>');
pw.document.close();
pw.focus();
pw.print()
}
</script>
</head>
<body>
<form>
<table width="760">
 <tr colspan="2">
    <td>!--TOP BANNER--
<input type=button value=Print onClick="printContenet()">
    <td>
 </tr>
 <tr>
    <td>!--LEFT MENU--</td>
    <td><div id=Content>!--CONTENT--</div></td>
 </tr>
</table>
</form>
</body>
</html>

Hope this helps

Partha
0
 
LVL 3

Expert Comment

by:makc
ID: 9596227
Did ya tried album layout ?
That one
+--------------+
+                 +
+--------------+
instead of portrait
+-----+
+      +
+      +
+      +
+-----+ ??

if seriously, try something like

<style>
  @media print { .MyTBODY {zoom:0.5;} }
</style>
0
 

Author Comment

by:ssdanu
ID: 9596327
Hi,
I tried landscape too but stilll 3-4 columns are l;ost as they do not fit in the page
Is there any way so thaat those columns not fitting in page size get printed on next page??

I desperately want a solution for this problem...

Can you please give the solution


Thanks & Best Regards
ssdanu
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:ssdanu
ID: 9596391
HI,

 I tried this
@media print { .MyTBODY {zoom:0.5;} }

  solution but it is not working Ca you please explain that in detail


Thanks  & Regards
ssdanu
0
 

Author Comment

by:ssdanu
ID: 9597123
HI,

Is there any way so that we can specify and tell the printer to print forst 4 columns then on next page print next 4 columns etc.. programmatically??


Thanks
ssdanu
0
 
LVL 3

Expert Comment

by:makc
ID: 9608017
you should identify your table to style sheet first.

@media print { .MyTBODY {zoom:0.5;} } assumes you have <TABLE CLASS=MyTBODY ... declaration.

style above would force IE to shrink table with CLASS=MyTBODY when printing, so it might be printed just fine on single page...
0
 
LVL 3

Assisted Solution

by:makc
makc earned 166 total points
ID: 9608067
Try, for example, to print-preview HTML below:

<style>
 @media print { .MyTBODY {zoom:0.5;} }
</style>

<table class=MyTBODY border=1>
<tr>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>last</td>
</tr>
</table>

<table border=1>
<tr>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>tooooo_wide</td>
 <td>last</td>
</tr>
</table>

0
 
LVL 23

Assisted Solution

by:sciwriter
sciwriter earned 166 total points
ID: 9638047
Printing is handled by the browser based on user printer and page settings.  Javascript cannot change this, since it is a local hard drive issue, and Javascript, via web pages, has no access to those settings.

The best you can do is break your table into two separate columns, or tell the user to set his printer to landscape mode and hope it will fit.  Whatever you can set on your own computer to get the columns to print, the user will be able to do the same, so use that as a guide.
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10345711
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: p_partha {http:#9594322} & makc {http:#9608067} & sciwriter {http:#9638047}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question