Recently, when I was working on a web page that contains tables, I had a long history of problems. The specific manifestation is that when printing on my own computer, everything is normal, a piece of paper can accommodate the entire table. However, when printing on the customer's computer, the table occupies two sheets of paper, and the right part is missing.
I found a lot of information and finally found that this is a problem with the IE version. An "advanced printing" feature is added from IE7. The page content is automatically scaled during printing to fit the size of the printed paper. I use IE8 and the client uses IE6, so this is a strange problem.
After finding the cause, the solution will come out: Adjust the page range according to the paper size. The customer uses A4 paper, the width is 210mm, the height is 297mm, and the margin is 19mm mm. The size of the calculated table should be 172mm * 253mm. It is best to remove the header, take 170mm * 250mm. Otherwise, the border of the table may not be printed.
Next, set the width to 170mm and height to 250mm In the CSS style of the table. In this way, the table is smaller than the original one, so the font of the table must be reduced. According to the test, we found that the size of the A4 paper font with X-Small is enough.
This method looks stupid, But it finally handles this printing function. However, if you want this page to be viewed and printed in a browser, this method will be ineffective. Therefore, the fundamental solution is to upgrade Internet Explorer to version 7 or later.
If you have another perfect solution, please kindly advise!