Home > other >  Cannot print when td content is too large while printing
Cannot print when td content is too large while printing

Time:12-30

<tr>       
   <td>
     <table> 
        <tr>
          <td>
              <div>
                 lot of data
              </div>
          </td>
       </tr>
   </table>
 </td>

I can print properly in a4 or others. However, a6 paper size preview is loading error on chrome. Works fine in Microsoft Edge.Why?

CodePudding user response:

Use WordWrap

<table style="table-layout: fixed; width: 100%">
  <tr>
    <td style="word-wrap: break-word">
       lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data lot of data 
    </td>
  </tr>
</table>

CodePudding user response:

enter image description here

It does not print the part with a lot of data as in the picture, it gives an error loading the preview. but the other short one prints on A6

CodePudding user response:

<table style="width:50%; margin: 0 auto;">
        <tr>
            <th>data</th>
        </tr>
        <tr>
            <td>
                <div style="word-break: break-word;">
                    lot of lot of data lot of data lot of data lot of data lot of data lot of data lot of data
                </div>
            </td>
        </tr>
  </table>

  • Related