PDF with table with PhantomJS

0

I'm using PhantomJS to generate a PDF from an html page that contains a report.

The page has a very large table, the problem I'm having is the line break when the PDF is generated.

I'm going to graze a photo of the problem.

Mytablelookslikethis:

<html><head><metacharset="UTF-8">
    <title>RELATÓRIO</title>
        <style>
            table.relatorio {
                font-family: 'Verdana', sans-serif;
                font-size: 10px;
                border-collapse: collapse;
                width: 100%;
                background: #ffffff;
            }
            table.relatorio tr td {
                border: 1px solid #484848;
                text-align: center;
            }
            table.relatorio td.numeric {
                text-align: right;
            }
            table.relatorio tfoot tr td,
            table.relatorio thead tr td {
                background: #D7D7D7;
                height: 20px;
                font-weight: bold;
            }
        </style>
    </head>
    <body>

        <!-- Relatório -->
        <table class="relatorio">
            <caption>
                RELATÓRIO
            </caption>

                <thead>
                    <tr>
                        <td>ID LOG</td>
                        <td>USUÁRIO</td>
                        <td>DATA</td>
                        <td>OPERAÇÃO</td>
                    </tr>
                </thead>

                <tbody>
                    <tr>
                        <td>1</td>
                        <td>HUGO</td>
                        <td>20/20/2020</td>
                        <td style="max-width: 250px;">TESTES</td>
                    </tr>
                </tbody>

                <tfoot>
                    <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>TOTAL DE OPERAÇÕES: 3</td>
                    </tr>
                </tfoot>
        </table>
    </body>
</html>

Does anyone know how to solve this problem?

    
asked by anonymous 30.04.2018 / 19:23

0 answers