【问题标题】:Text shadow in TCPDFTCPDF 中的文本阴影
【发布时间】:2015-03-12 14:23:04
【问题描述】:

我们想在某些文本中添加文本阴影,而不是在某些文本中添加文本阴影。 使用 tcpdf 可以吗

我们希望显示带有文字阴影的价格和其他没有文字阴影的内容

我们将这段代码用于文本阴影

$pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>1, 'depth_h'=>1, 'color'=>array(255,0,0), 'opacity'=>1, 'blend_mode'=>'Normal'));

但它适用于整个页面

【问题讨论】:

    标签: php tcpdf


    【解决方案1】:

    写完一些文字后,您可以禁用。

    //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);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-10-17
      • 2012-03-13
      • 2012-12-08
      • 1970-01-01
      • 2018-03-05
      • 1970-01-01
      • 2011-03-18
      相关资源
      最近更新 更多