When trying to print a table generated by phpExcel , IE ignores any styles and borders when going to the next page.

When displayed in the browser - everything is displayed correctly, and when printing - no longer.

border-collapse , manually writing styles to cells, using @media print css, and so on did not help.

The styles on the second page are selectively ignored when trying to print.

ps I apologize for this method of making screenshots. On the Windows computer there is no Internet and the ability to insert a USB flash drive.

In the browser:

Display the bottom half of the table in the browser

In preview:

She, when trying to print

An example of the generated problem code.

The solution from the next topic did not work - there was another problem.

The option to move the doctype to the very beginning of the code did not work.

Currently reproduced on all current versions of IE. On the Edge is not reproduced, it is already on another engine.

    1 answer 1

     <title>Печать технологической карты обслуживания и ремонта для ЕО "Экземпляр №3 мерный"</title><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 

    title must not stand up to doctype . This placement of tags leads to the transition to the Quirks 5 mode (IE 5.5 emulation), in which not only almost all css features are not supported, but there are a huge number of all kinds of bugs.

    Most likely, the transfer of the doctype to the beginning of the document will solve the problem with styles.

    • pastebin.com/KgKpgQ7V Here is the code variant with the doctype at the beginning. Unfortunately it did not help. - Victor Zharikov
    • @ Victor Zharikov, remove the empty string too. Remove everything, even BOM. That is, the < character must be first in the document. - Qwertiy
    • Incorrect paste in pastebin. In the code like this pastebin.com/gcamtNS2 - Victor Zharikov
    • @ Viktor Zharikov, really does not help ... The point is clearly in the pile of rules with important ones - when they are removed, something changes. - Qwertiy
    • Unfortunately, this code is autogenerated in phpExcel. Therefore, I can change it, too, only by means of this library. What is important you have removed to achieve the desired effect? I will try to dig in this direction. - Victor Zharikov