代码之家  ›  专栏  ›  技术社区  ›  santanu bera

setDrawColor()的行为与setFillColor()类似

  •  0
  • santanu bera  · 技术社区  · 6 年前

    setDrawColor() should to color cell frame but instead another color is rendering as background color 。这是整个代码:-

    $pdf=new fpdf();
    $pdf->设置文本颜色(103、58、183);
    $pdf->设置绘图颜色(0、80、180);
    //第四页--
    $pdf->addpage();
    $pdf->setfont('Arial','b',16);
    $pdf->单元格(0,10,“Hello Santanu”,1,1,'c',true);
    
    $pdf->输出(“helo.pdf”,“d”);
    

    SetDrawColor()应该涂颜色单元框架但另一种颜色是渲染为背景色.这是整个代码:

        $pdf = new FPDF();
        $pdf->SetTextColor(103, 58, 183);
        $pdf->SetDrawColor(0, 80, 180);
        // Fourth Page --
        $pdf->AddPage();
        $pdf->SetFont('Arial','B',16);
        $pdf->Cell(0, 10, "Hello Santanu", 1, 1, 'C', true);
    
        $pdf->Output('helo.pdf', 'D');
    
    1 回复  |  直到 6 年前
        1
  •  0
  •   Lovepreet Singh    6 年前

    SetFillColor

    $pdf->SetFillColor(0, 0, 0);