Uppercase in tcpdf

I'm trying to make a text-transform into a table wich i create with the library of TCPDF for PHP, but i can't make the transform, I've read that the library doesn't have the support for some class of CSS, so I'm here to ask if thats is true o someone have a solution.

$bloque4 = <<<EOF

<style>
    .uppercase {
        text-transform: uppercase;
    }
</style>

    <table class="uppercase">
        <tr>
            <td style="font-weight: bold; width:140px"><img src="images/back.jpg"></td>

        </tr>
    </table>

    <table style="font-weight: bold; padding:5px 10px;">

        <tr>

        <td style="font-weight: bold; border: 0.7px solid #000000; background-color:white; width:250px;">Condiciones en que se recibe: $respuestaVenta[condiciones] <br><br> Piezas faltantes: $respuestaVenta[pzasFaltantes] <br><br> Piezas maltratadas y/o rotas: $respuestaVenta[pzasRotas]</td>
        <td style="font-weight: bold; border: 0.7px solid #000000; background-color:white; width:290px; text-align:right;">Tipo de servicio: $respuestaVenta[tipoReparacion]
        </td>

        </tr>
    </table>

EOF;

$pdf->writeHTML($bloque4, false, false, false, false, '');

problem with the new array $respuestaVenta = array_map('strtoupper', $respuestaVenta);

enter image description here

this is the way how I print the resulto before use the array_map

<td style="font-weight: bold; border: 0.7px solid #000000; background-color:white; width:135px; text-align:center;">$respuestaVenta[descripcion]</td>

1 answer

  • answered 2018-03-13 20:23 Don't Panic

    If you're concerned that you won't be able to do it with CSS, then just capitalize your array with PHP before you use it.

    $respuestaVenta = array_map('strtoupper', $respuestaVenta);
    $bloque4 = <<<EOF
    //  ...