$pdf->setTextColor(255, 255, 255); $pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(0,0,0), 'opacity'=>1, 'blend_mode'=>'Normal')); $pdf->SetFont('times', '', 20); $pdf->Cell(0, 10, 'Hello World', 0, 1, 'L');
$pdf->setTextColor(0, 0, 0); $pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.5, 'depth_h'=>0.5, 'color'=>array(255,0,0), 'opacity'=>1, 'blend_mode'=>'Normal')); $pdf->SetFont('times', '', 20); $pdf->Cell(0, 10, 'Welcome', 0, 1, 'L');This code will add a red text shadow effect to the text "Welcome" with a depth of 0.5 in the PDF document.