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


PHP PDF_AutoPrint::SetTopMargin方法代码示例

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


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

示例1: array

	$db->update($sql, $data);


	$sql = "SELECT `hn`,`idcard`,`yot`,`name`,`surname`,`ptright`,`dbirth`,`no_card`
	FROM  `opcard` 
	WHERE  `hn` LIKE  :hn_patient ";
	$data = array(':hn_patient' => $cHn);
	$db->select($sql, $data);
	$item = $db->get_item();


	$pdf = new PDF_AutoPrint("P",'mm', "A4");
	$pdf->SetThaiFont(); // à«çµ¿Í¹µì
	$pdf->SetAutoPageBreak(false, 0);
	$pdf->SetMargins(0, 0);
	$pdf->SetTopMargin(2);
	$pdf->AddPage();
	$pdf->SetFont('THSarabun'); // àÃÕ¡ãªé§Ò¹¿Í¹µì·ÕèàµÃÕÂÁäÇé

	$pdf->SetFontSize(17);

	$pdf->SetXY(185, 7);
	$pdf->Cell(10, 6, $item['no_card'],0,1);

	$pdf->SetXY(45, 19);
	$pdf->Cell(40, 6, $item['hn'],0,1);

	$pdf->SetXY(110, 19);
	$pdf->Cell(100, 6, $item['yot'].' '.$item['name'].' '.$item['surname'],0,1);

	$pdf->SetXY(45, 27);
开发者ID:robocon,项目名称:shs,代码行数:31,代码来源:opdprintpdf.php

示例2: getPrintParams

     {
         //Print on a shared printer (requires at least Acrobat 6)
         $script = "var pp = getPrintParams();";
         if ($dialog) {
             $script .= "pp.interactive = pp.constants.interactionLevel.full;";
         } else {
             $script .= "pp.interactive = pp.constants.interactionLevel.automatic;";
         }
         $script .= "pp.printerName = '\\\\\\\\" . $server . "\\\\" . $printer . "';";
         $script .= "print(pp);";
         $this->IncludeJS($script);
     }
 }
 $pdf = new PDF_AutoPrint('P', 'mm', 'A4');
 $pdf->AliasNbPages();
 $pdf->SetTopMargin(10);
 $pdf->SetLeftMargin(10);
 $pdf->SetRightMargin(10);
 $pdf->AddPage();
 $pdf->SetWidths(array(20, 20, 20, 20, 110));
 $pdf->SetAligns(array('C', 'R', 'R', 'R', 'L'));
 srand(microtime() * 1000000);
 $pdf->Table();
 $filename = "Laporan Stok " . $GLOBALS['ItemName'] . " " . $GLOBALS['date'] . ".pdf";
 //$pdf->AutoPrint(true);
 if ($_GET['PrintType'] == "1") {
     $pdf->Output($filename, "D");
 } else {
     $pdf->AutoPrint(true);
     $pdf->Output($filename, "I");
 }
开发者ID:ricmawan,项目名称:projects,代码行数:31,代码来源:Print.php

示例3: explode

        } else {
            $script .= "pp.interactive = pp.constants.interactionLevel.automatic;";
        }
        $script .= "pp.printerName = '\\\\\\\\" . $server . "\\\\" . $printer . "';";
        $script .= "print(pp);";
        $this->IncludeJS($script);
    }
}
$pdf = new PDF_AutoPrint('P', 'cm', 'custom', 431.3, 263.622);
//$pdf->FPDF('P','mm','A4');
//$pdf=new FPDF('P','cm','custom',362.835,263.622);  //ingreso medida puntos
//$pdf->Open();
$pdf->AliasNbPages();
$pdf->SetLeftMargin(1.8);
$pdf->PageNo();
$pdf->SetTopMargin(1.7);
$pdf->SetAutoPageBreak(0.5);
$pdf->AddPage();
$pdf->SetFont('arial', '', 8);
$venta->ventas_ver($_REQUEST['venta']);
$nro_documento = $venta->ven_nrodoc;
$cliente_nombre = $venta->cli_razonsocial;
$cliente_direccion = $venta->cli_direccion;
$cliente_ruc = $venta->cli_ruc;
$e_fecha = $venta->_util->obtiene_fecha($venta->ven_fecha);
$fecha = explode("/", $e_fecha);
//si fecha esta en formato dia-mes-año
$dia = $fecha[0];
$mes = $venta->_util->ver_nombre_mes($fecha[1]);
$mes_numero = $fecha[1];
$anio = substr($fecha[2], 2);
开发者ID:kailIII,项目名称:Sistema-de-ventas-1.0,代码行数:31,代码来源:boleta_impresion.php

示例4: AutoPrintToPrinter

            $param = $dialog ? 'true' : 'false';
            $script = "print({$param});";
            $this->IncludeJS($script);
        }
        function AutoPrintToPrinter($server, $printer, $dialog = false)
        {
            //Print on a shared printer (requires at least Acrobat 6)
            $script = "var pp = getPrintParams();";
            if ($dialog) {
                $script .= "pp.interactive = pp.constants.interactionLevel.full;";
            } else {
                $script .= "pp.interactive = pp.constants.interactionLevel.automatic;";
            }
            $script .= "pp.printerName = '\\\\\\\\" . $server . "\\\\" . $printer . "';";
            $script .= "print(pp);";
            $this->IncludeJS($script);
        }
    }
    $pdf = new PDF_AutoPrint('P', 'cm', 'A5');
    $pdf->AliasNbPages();
    $pdf->SetTopMargin(0.5);
    $pdf->SetLeftMargin(1);
    $pdf->SetRightMargin(1);
    $pdf->AddPage();
    $pdf->Table();
    $filename = "Invoice.pdf";
    $pdf->AutoPrint(true);
    $pdf->Output($filename, "I");
    //$printcmd = "java -classpath C:/xampp/htdocs/Projects/KlinikGigi/Source/assets/lib/pdfbox-app-2.0.2.jar org.apache.pdfbox.PrintPDF -silentPrint -printerName 'EPSON ME 340 Series' C:/xampp/htdocs/Projects/KlinikGigi/Source/Transaction/Payment/Print.php";
    //exec($printcmd);
}
开发者ID:ricmawan,项目名称:projects,代码行数:31,代码来源:Print.php

示例5: explode

            $script .= "pp.interactive = pp.constants.interactionLevel.full;";
        } else {
            $script .= "pp.interactive = pp.constants.interactionLevel.automatic;";
        }
        $script .= "pp.printerName = '\\\\\\\\" . $server . "\\\\" . $printer . "';";
        $script .= "print(pp);";
        $this->IncludeJS($script);
    }
}
$pdf = new PDF_AutoPrint('P', 'cm', 'custom', 714.0, 394.016);
//ingreso medida puntos
//$pdf->Open();
$pdf->AliasNbPages();
$pdf->SetLeftMargin(0.3);
$pdf->PageNo();
$pdf->SetTopMargin(2.5);
$pdf->SetAutoPageBreak(0.9);
$pdf->AddPage();
$pdf->SetFont('arial', '', 9);
$venta->ventas_ver($_REQUEST['venta']);
$nro_documento = $venta->ven_nrodoc;
$cliente_nombre = $venta->cli_razonsocial;
$cliente_direccion = $venta->cli_direccion;
$cliente_ruc = $venta->cli_ruc;
$e_fecha = $venta->_util->obtiene_fecha($venta->ven_fecha);
$fecha = explode("/", $e_fecha);
//si fecha esta en formato dia-mes-año
$dia = $fecha[0];
$mes = $venta->_util->ver_nombre_mes($fecha[1]);
$mes_numero = $fecha[1];
$anio = substr($fecha[2], 2);
开发者ID:kailIII,项目名称:Sistema-de-ventas-1.0,代码行数:31,代码来源:factura_impresion.php


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