本文整理汇总了PHP中PDF_AutoPrint::Output方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF_AutoPrint::Output方法的具体用法?PHP PDF_AutoPrint::Output怎么用?PHP PDF_AutoPrint::Output使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF_AutoPrint
的用法示例。
在下文中一共展示了PDF_AutoPrint::Output方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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:
$pdf->SetY($Y + 10);
$pdf->Cell(0, 0, "Descuento: " . "-\$ " . number_format($totalDescuento[0], 2), 0, 0, R);
$pdf->SetY($Y + 15);
$pdf->Cell(0, 0, "Total: " . "\$ " . number_format($TOTAL - $totalDescuento[0], 2), 0, 0, R);
} else {
$pdf->SetY($Y + 10);
$pdf->Cell(0, 0, "Total: " . "\$ " . number_format($TOTAL, 2), 0, 0, R);
}
$pdf->SetFont('Arial', '', 10);
$pdf->SetXY(2, 120);
$pdf->Cell(0, 0, '*** ' . $resultado . ' ' . $formula . ' ***', 0, 0, L);
$pdf->SetXY(2, $Y + 10);
$pdf->Cell(0, 0, 'Este documento no es deducible fiscalmente', 0, 0, L);
//Launch the print dialog
$pdf->AutoPrint(false);
$pdf->Output();
} else {
$pdf->Ln(10);
//salto de linea
//$pdf->Line(2,5, 199,5);
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 0, "Subtotal: " . "\$" . number_format($cargos[0] - $abonos[0], 2), 0, 0, R);
$pdf->Ln(4);
//salto de linea
$pdf->Cell(0, 0, "Iva: " . "\$" . number_format($ivaCargos[0] - $ivaAbonos[0], 2), 0, 0, R);
$pdf->Ln(4);
//salto de linea
$pdf->Cell(0, 0, "Total: " . "\$" . number_format($TOTAL, 2), 0, 0, R);
$pdf->SetFont('Arial', '', 10);
$pdf->SetX(2);
$pdf->Cell(0, 0, '*** ' . $resultado . ' ' . $formula . ' ***', 0, 0, L);
示例3: substr
$o_b = mysqli_fetch_array($opt_b);
$reduce = substr($key, 0, -3);
$opt_2b .= $o_b[0] . ". " . $val . "; ";
}
}
//$opt_o = "\nOptativas de Bachillerato".$opt_2b;
if ($curso == "1BACH") {
$MiPDF->Cell(80, 5, $n_curso . "º DE BACH. ( " . $mod_registro . " )", 1, 0, 'C');
$MiPDF->MultiCell(88, 5, $bil . $opt, 1);
$MiPDF->Ln(2);
}
if ($curso == "2BACH") {
$MiPDF->Cell(80, 5, $n_curso . "º DE BACH. ( " . $mod_registro2b . " )", 1, 0, 'C');
$MiPDF->MultiCell(88, 5, $bil . $opt2b, 1);
$MiPDF->Cell(165, 5, "MATERIAS OPTATIVAS", 0, 0, "C");
$MiPDF->Ln(5);
$MiPDF->MultiCell(168, 5, $opt_2b, 1);
$MiPDF->Ln(8);
if (!$repetidor) {
$MiPDF->Cell(165, 5, "MODALIDAD Y OPTATIVAS DE 1º BACHILLERATO", 0, 0, "C");
$MiPDF->Ln(5);
$MiPDF->Cell(80, 5, "MODALIDAD " . $mod_registro . " )", 1, 0, 'C');
$MiPDF->MultiCell(88, 5, $bil . $opt, 1);
$MiPDF->Ln(2);
}
}
}
}
$MiPDF->AutoPrint(true);
$MiPDF->Output();