zoukankan      html  css  js  c++  java
  • pdf 中画虚线

    <?php

    require('fpdf.php');

    class PDF_Dash extends FPDF

    {

    function SetDash($black=null, $white=null)

    {

    if($black!==null)

    $s=sprintf('[%.3F %.3F] 0 d',$black*$this->k,$white*$this->k);

    else

    $s='[] 0 d';

    $this->_out($s);

    }

    }

    ?>

    <?php

    require('dash.php');

    $pdf=new PDF_Dash();

    $pdf->AddPage();

    $pdf->SetLineWidth(0.1);

    $pdf->SetDash(5,5); //5mm on, 5mm off

    $pdf->Line(20,20,190,20);

    $pdf->SetLineWidth(0.5);

    $pdf->Line(20,25,190,25);

    $pdf->SetLineWidth(0.8);

    $pdf->SetDash(4,2); //4mm on, 2mm off

    $pdf->Rect(20,30,170,20);

    $pdf->SetDash(); //restores no dash

    $pdf->Line(20,55,190,55);

    $pdf->Output(); ?>

  • 相关阅读:
    jmeter 插件
    jmeter beanshell
    Linux awk&sed
    Linux 各文件系统配置
    Linux常用基本命令 1
    testNg自动化,读取excel的数据
    jmeter 控制器
    Web
    SQL语句
    HTML
  • 原文地址:https://www.cnblogs.com/caicaizi/p/11115428.html
Copyright © 2011-2022 走看看