Linked Questions
39 questions linked to/from How to deal with page breaks when printing a large HTML table
-3 votes
1 answer
3k views
Page Break in HTML Table [duplicate]
Is there any way to have a page break in a HTML table? I've been trying to get page breaks on the following HTML: <html> <title>testfile</title> <meta http-equiv="...
0 votes
2 answers
393 views
Is it possible to use CSS to print pages better? [duplicate]
I have a HTML page which is very simple, it just has a vertical table that gets data dynamically generated into it. The problem I am having is that when I want to print my page, it cuts off halfway ...
0 votes
0 answers
217 views
HTML/PHP: how to print only a number of rows depending on page length [duplicate]
I should write a long html table and it will stay on several pages. They asked me to "manually" handle the number of rows to be printed on each page, and this number depends on the available ...
0 votes
2 answers
150 views
what resolution should I use in my code to test if a table runs off the page? [duplicate]
I have a large amount of tables which I have created a script to count the tables height and I will add a class to the table if it runs off the page in order for it to do a page break. The only thing ...
703 votes
23 answers
743k views
How to use HTML to print header and footer on every printed page of a document?
Is it possible to print HTML pages with custom headers and footers on each printed page? I'd like to add the word "UNCLASSIFIED" in Red, Arial, size 16pt to the top and bottom of every printed page, ...
175 votes
7 answers
417k views
Margin while printing html page
I am using a separate style-sheet for printing. Is it possible to set right and left margins in the style-sheet which set the print margin? (i.e. margin on paper)
26 votes
3 answers
105k views
Printing HTML table with many columns/rows using CSS layout?
I want to print a large table (so large that its rows are approx. 3 sheets of papers wide) from HTML. If possible, CSS should suffice for layout and the solution should work with different browsers. ...
25 votes
8 answers
20k views
Converting HTML to PDF (not PDF to HTML) using PHP [closed]
I am a PHP developer and in one of my projects, I need to convert some HTML documents (about 30 to 50 pages) into PDF documents. My search has turned up the following possible solutions. Among them ...
4 votes
7 answers
19k views
Is it necessary to have <th> in any table?
is it necessary to have <th> in any table? even if table has no heading? table has 3 other tag <thead> <tbody> <tfoot> is it necessary to use all even if i have nothing for ...
14 votes
4 answers
12k views
How to separate body content with fixed header and footer for multiple pages
I Have three separate section as header, body and footer to create pdf. Header part will come always at top of each page and it will be fix. ______________________ | header | |...
12 votes
4 answers
7k views
HTML, CSS - Row break for long table needs a fix
I played around with page-break-inside:auto, page-break-inside:avoid, page-break-after:auto, margin-top and margin-bottom and others for quite a long time, but still can't find a solution how to break ...
7 votes
2 answers
17k views
How to avoid splitting an HTML table across pages
Please excuse my English. I am printing a large report in pdf format including some tables (table after table). To do this, I first generated the report in html, then passed it on to pdf using dompdf ...
8 votes
1 answer
15k views
Stategies for printing multiple page HTML tables and dealing with page breaks
I have seen this similar question. (I highlighted the important bits to make skim-reading the question faster) To add to it though, I would like to format an HTML table (with a lot of rows) in such ...
5 votes
3 answers
19k views
Printing huge table with window.print() only prints one page
I have a web page with a very wide report table--dozens of columns, quite a bit of horizontal scrolling. When I try to print the page with window.print(), the browser (Firefox or Chrome) just prints ...
3 votes
2 answers
5k views
How can I print a multi-page report in my web application?
I have a web application that produce its reports in HTML format. Sometimes these reports become very much and the window shows scrollbars. The problem I have is that I can just print what I see in ...