我们希望在某些文本中添加文本阴影,而不是在某些文本中添加文本阴影。 使用 tcpdf 可以吗
我们希望显示带有文本阴影的价格和没有文本阴影的其他内容
我们使用此代码进行文本阴影
$pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>1, 'depth_h'=>1, 'color'=>array(255,0,0), 'opacity'=>1, 'blend_mode'=>'Normal'));
但它适用于整个页面
最佳答案
写入一些文本后,您可以禁用。
//Enable
$pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>1, 'depth_h'=>1, 'color'=>array(255,0,0), 'opacity'=>1, 'blend_mode'=>'Normal'));
$pdf->MultiCell(60, '', 'some shadowed text', 0, 'L', false, 1, 85, 10);
//Disable
$pdf->setTextShadow(array('enabled'=>false, 'depth_w'=>1, 'depth_h'=>1, 'color'=>array(255,0,0), 'opacity'=>1, 'blend_mode'=>'Normal'));
$pdf->MultiCell(60, '', 'without shadowed text', 0, 'L', false, 1, 85, 25);
关于php - TCPDF 中的文本阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27942309/