本文整理汇总了PHP中PDF_AutoPrint::SetLeftMargin方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF_AutoPrint::SetLeftMargin方法的具体用法?PHP PDF_AutoPrint::SetLeftMargin怎么用?PHP PDF_AutoPrint::SetLeftMargin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF_AutoPrint
的用法示例。
在下文中一共展示了PDF_AutoPrint::SetLeftMargin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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");
}
}
示例2: explode
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', '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]);
示例3: 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);
}
示例4: getPrintParams
$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', '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]);