FPDF - I need to customize the text that will be printed [closed]

Closed. this question is out of scope and is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 1 year ago .

improve this question

I need the content $pdf->MultiCell to be customized (html) with bold, etc...

<?php
    require_once( 'fpdf.php' );

    $nome  = @$_POST['nome']; // Sim, a supressão é perfeitamente válida neste contexto
    $horas = @$_POST['horas']; // pois os parâmetros serão checados logo em seguida.
    $data  = @$_POST['omail'];
    $datan  = @$_POST['datan'];


    class PDF extends FPDF
    {
        // Page header
        function Header()
        {
            // Logo
            $this->Image('cabecalho.png',-20,2,250);
            // Arial bold 15
            $this->SetFont('Arial','B',15);
            // Move to the right
            $this->Cell(80);
            // Line break
            $this->Ln(20);
        }

        // Page footer
        function Footer()
        {
            // Logo
            $this->Image('rodape.png',-20,270,250);
            // Position at 1.5 cm from bottom
            $this->SetY(-15);
            // Arial italic 8
            $this->SetFont('Arial','I',8);
            // Page number
            $this->Cell(210,-17,'Página '.$this->PageNo().'/{nb}',0,0,'C');
        }
    }

    // Instanciation of inherited class
    $pdf = new PDF();
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetFont('Times','',12);
        $pdf->SetFont('Arial','', 10);
        $pdf->SetXY( 10, 50 );
        $pdf->MultiCell( 190, 6,
          "Caro $nome

          [b]CONTRATADA</b>");

    $pdf->Output();
?>
Author: Wictor Chaves, 2017-09-22

1 answers

Try This:

$pdf->SetFont('Arial','B', 10);
    $pdf->SetXY( 10, 50 );
    $pdf->MultiCell( 190, 6,
      "Caro $nome

      [b]CONTRATADA</b>");
 0
Author: Paulo, 2019-12-11 13:28:53