当前位置: 首页>>代码示例>>PHP>>正文


PHP PDF::setaligns方法代码示例

本文整理汇总了PHP中PDF::setaligns方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::setaligns方法的具体用法?PHP PDF::setaligns怎么用?PHP PDF::setaligns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PDF的用法示例。


在下文中一共展示了PDF::setaligns方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Material Status List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.materialstatusname\r\n      from materialstatus a";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C'));
     $pdf->setwidths(array(50, 70));
     $pdf->Row(array('Material Status Name'));
     $pdf->setaligns(array('L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['materialstatusname']));
     }
     // me-render ke browser
     $pdf->Output('materialstatus.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:MaterialstatusController.php

示例2: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Unit of Measure List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.uomcode,a.description\r\n      from unitofmeasure a";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C'));
     $pdf->setwidths(array(50, 90));
     $pdf->Row(array('Unit of Measure', 'Description'));
     $pdf->setaligns(array('L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['uomcode'], $row1['description']));
     }
     // me-render ke browser
     $pdf->Output('unitofmeasure.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:UnitofmeasureController.php

示例3: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Employee Informal List';
     $pdf->AddPage('P');
     $sql1 = "select splettername, description, validperiod\r\n      from splettertype a";
     $pdf->setFont('Arial', 'B', 8);
     $connection = Yii::app()->db;
     $command1 = $connection->createCommand($sql1);
     $dataReader1 = $command1->queryAll();
     $pdf->text(10, 40, 'Course / Trainig / skill List');
     $pdf->SetY(45);
     $pdf->setaligns(array('C', 'C', 'C'));
     $pdf->setwidths(array(50, 40, 30));
     $pdf->Row(array('SP Letter Name', 'Description', 'Period'));
     $pdf->setaligns(array('L', 'L', 'L'));
     foreach ($dataReader1 as $row1) {
         $pdf->row(array($row1['splettername'], $row1['description'], $row1['validperiod']));
     }
     // me-render ke browser
     $pdf->Output('splettertype.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:23,代码来源:SplettertypeController.php

示例4: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Schedule Master List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.onleavename, a.cutimax,a.cutistart,b.formatdoc,c.shortstat\r\n      from onleavetype a\r\n      left join snro b on b.snroid = a.snroid\r\n      left join absstatus c on c.absstatusid = a.absstatusid";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C', 'C'));
     $pdf->setwidths(array(50, 20, 20, 50, 20));
     $pdf->Row(array('Onleave', 'Cuti Max', 'Cuti Start', 'Format Doc', 'Cuti Status'));
     $pdf->setaligns(array('L', 'L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['onleavename'], $row1['cutimax'], $row1['cutistart'], $row1['formatdoc'], $row1['shortstat']));
     }
     // me-render ke browser
     $pdf->Output('onleavetype.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:OnleavetypeController.php

示例5: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Storage Location List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select b.plantcode, a.sloccode, a.description\r\n      from sloc a\r\n      left join plant b on b.plantid = a.plantid";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C'));
     $pdf->setwidths(array(30, 30, 70));
     $pdf->Row(array('Plant', 'Sloc Code', 'Description'));
     $pdf->setaligns(array('L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['plantcode'], $row1['sloccode'], $row1['description']));
     }
     // me-render ke browser
     $pdf->Output('sloc.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:SlocController.php

示例6: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Schedule Master List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.employeestatusname, a.taxvalue\r\n      from employeestatus a";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C'));
     $pdf->setwidths(array(50, 30, 30, 30));
     $pdf->Row(array('Employee Status', 'Tax Value'));
     $pdf->setaligns(array('L', 'R', 'C', 'C'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['employeestatusname'], $row1['taxvalue']));
     }
     // me-render ke browser
     $pdf->Output('employeestatus.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:EmployeestatusController.php

示例7: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Asset List';
     $pdf->AddPage('L');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select b.productname,c.sloccode,a.expiredate,a.serialno,a.qty,d.uomcode,a.buydate,\r\n      a.buyprice,e.currencyname,a.picproduct,a.location,a.locationdate\r\n      from productdetail a\r\n      left join product b on b.productid = a.productid\r\n      left join sloc c on c.slocid = a.slocid\r\n      left join unitofmeasure d on d.unitofmeasureid = a.unitofmeasureid\r\n      left join currency e on e.currencyid = a.currencyid";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
     $pdf->setwidths(array(50, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20));
     $pdf->Row(array('Material Name', 'Sloc', 'Expire Date', 'Serial No', 'Qty', 'UOM Code', 'Buy Date', 'Buy Price', 'Currency', 'PIC Product', 'Location', 'Loc Date'));
     $pdf->setaligns(array('L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['productname'], $row1['sloccode'], $row1['expiredate'], $row1['serialno'], $row1['qty'], $row1['uomcode'], $row1['buydate'], $row1['buyprice'], $row1['currencyname'], $row1['picproduct'], $row1['location'], $row1['locationdate']));
     }
     // me-render ke browser
     $pdf->Output('productdetail.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:ProductdetailController.php

示例8: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Material Group List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.materialgroupcode, a.description,\r\n      b.materialgroupcode as parentgroupcode,c.materialtypecode as materialtype\r\n      from materialgroup a\r\n      left join materialgroup b on b.materialgroupid = a.parentmatgroupid \r\n      left join materialtype c on c.materialtypeid = a.materialtypeid";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C'));
     $pdf->setwidths(array(30, 50, 30, 30));
     $pdf->Row(array('Code', 'Material Type', 'Description', 'Parent Group Code'));
     $pdf->setaligns(array('L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['materialgroupcode'], $row1['description'], $row1['materialtype'], $row1['parentgroupcode']));
     }
     // me-render ke browser
     $pdf->Output('materialgroup.pdf', 'D');
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:24,代码来源:MaterialgroupController.php

示例9: actionDownload

 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Form Permintaan (Barang/Jasa)';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.dano,a.dadate,a.headernote,a.deliveryadviceid\n      from deliveryadvice a\n      where deliveryadviceid = " . $_GET['id'];
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     foreach ($dataReader as $row) {
         $pdf->setFont('Arial', 'B', 8);
         $pdf->text(10, 30, 'No ');
         $pdf->text(50, 30, ': ' . $row['dano']);
         $pdf->text(10, 35, 'Date ');
         $pdf->text(50, 35, ': ' . $row['dadate']);
         $pdf->text(10, 40, 'Note ');
         $pdf->text(50, 40, ': ' . $row['headernote']);
         $sql1 = "select b.productname, a.qty, c.uomcode, a.itemtext\n        from deliveryadvicedetail a\n        left join product b on b.productid = a.productid\n        left join unitofmeasure c on c.unitofmeasureid = a.unitofmeasureid\n        where deliveryadviceid = " . $row['deliveryadviceid'];
         $command1 = $connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $pdf->text(10, 50, 'Items');
         $pdf->SetY(55);
         $pdf->setFont('Arial', 'B', 6);
         $pdf->setaligns(array('C', 'C', 'C', 'C', 'C'));
         $pdf->setwidths(array(10, 90, 25, 25, 40));
         $pdf->setFont('Arial', '', 6);
         $pdf->Row(array('No', 'Items', 'Qty', 'Unit', 'Remark'));
         $pdf->setaligns(array('L', 'L', 'L', 'L', 'L'));
         $i = 0;
         foreach ($dataReader1 as $row1) {
             $i = $i + 1;
             $pdf->row(array($i, $row1['productname'], Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberqty"], $row1['qty']), $row1['uomcode'], $row1['itemtext']));
         }
         $pdf->text(100, $pdf->gety() + 5, 'Jakarta, ' . $row['dadate']);
         $pdf->text(10, $pdf->gety() + 10, 'Approved By');
         $pdf->text(100, $pdf->gety() + 10, 'Proposed By');
         $pdf->text(10, $pdf->gety() + 20, '------------ ');
         $pdf->text(100, $pdf->gety() + 20, '------------');
         $pdf->AddPage('P');
     }
     $pdf->Output();
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:47,代码来源:DeliveryadviceController.php


注:本文中的PDF::setaligns方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。