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


PHP PDF_AutoPrint::Output方法代码示例

本文整理汇总了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");
    }
}
开发者ID:ricmawan,项目名称:projects,代码行数:31,代码来源:Print.php

示例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);
开发者ID:rusli-nasir,项目名称:hospitalPhp,代码行数:31,代码来源:imprimirCargosInternos.php

示例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();
开发者ID:iesportada,项目名称:intranet,代码行数:30,代码来源:caratulas_bach.php


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