mpdf自定义页面设置无效

时间:2016-07-17 10:30:18

标签: php codeigniter mpdf

我正在使用mpdf生成一个指定宽度和宽度的pdf文件。高度。我可以成功生成pdf文件,但是当我从左侧打印页面时,会裁剪一些内容。我还在我的打印机属性中设置了自定义页面大小。它仍然无效。我正在为我的项目使用codeigniter。 这是我的源代码:

<?php
    function mypdf(){
    $this->load->library('mpdf');
    $mpdf = new mPDF('bn', array(150,190), 9);        
    $orgname = $GatePassInfo->org_name;
    $gatepassdate = date_style($GatePassInfo->gatepassformatdate);
    $convnoteid = $GatePassInfo->conv_note_id;
    $convnoteno = $GatePassInfo->conv_note_no;
    $convnotedate = date_style($GatePassInfo->conv_Date);
    $time = $GatePassInfo->checkout_time;
    $chkouttime = date("H:i:s",strtotime($time));

    $mpdf->AddPage('P','','','','',30,30,10,10,10,10);

    $mpdf->WriteText(102, 10, "a");
    $mpdf->WriteText(100, 15, "b");
    $mpdf->WriteText(55, 26, "c");
    $mpdf->WriteText(56, 30, "d");
    $mpdf->WriteText(35, 40, "e");
    $mpdf->WriteText(24, 45, "$orgname");
    $mpdf->WriteText(75, 40, "f");
    $mpdf->WriteText(70, 46, "g");
    $mpdf->WriteText(70, 51, "h");
    $mpdf->WriteText(25, 67, "k");
    $mpdf->WriteText(105, 70, "$gatepassdate");

    $mpdf->Output();
    }
?>

0 个答案:

没有答案