Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Friends,

I have a problem for using Window.Print(). I used Literal control to display the data dynamically with multiple pages. But the preview page not displaying the bottom of the row properly. It shows 50% of data in first page and 50% of row in next page like wise.I want to print the rows properly. I tried to set width and height but its not working.

Can anyone help me please.
Posted
Updated 30-Jun-17 6:59am
Comments
Krunal Rohit 29-Oct-15 8:45am    
use page-break.

-KR

Use page-break.
CSS
@media print{
    table { page-break-inside:auto }
    tr    { page-break-inside:avoid; page-break-after:auto }
    thead { display:table-header-group }
    tfoot { display:table-footer-group }
}


Read about page-break here:
http://www.w3schools.com/cssref/pr_print_pageba.asp[^]
https://css-tricks.com/almanac/properties/p/page-break/[^]
See this thread as well:
http://stackoverflow.com/questions/1763639/how-to-deal-with-page-breaks-when-printing-a-large-html-table[^]

-KR
 
Share this answer
 
lwdnfäöqwvnqlkwvn q kö flköejfm wejfölökämfen flke nflwenf ölenföl enföl hfnlkfb hhdbkljefefrgflsdöngldngflgf gf lgnöfn glf glfj nglöjfn gljf gölfs gslg
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900