Exemplo n.º 1
0
        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);
    }
}
define('FPDF_FONTPATH', '../../pdf/font/');
# creamos el nuevo objeto partiendo de la clase ampliada
$MiPDF = new PDF_AutoPrint();
$MiPDF->SetMargins(20, 20, 20);
# ajustamos al 100% la visualización
$MiPDF->SetDisplayMode('fullpage');
// Consulta  en curso.
if (substr($curso, 0, 1) == '1') {
    $mas = ", colegio";
}
$n_curso = substr($curso, 0, 1);
$result0 = mysqli_query($db_con, "select distinct id_matriculas from matriculas_bach_temp, matriculas_bach where id=id_matriculas order by curso" . $mas . ", letra_grupo, apellidos, nombre");
while ($id_ar = mysqli_fetch_array($result0)) {
    $id = $id_ar[0];
    $result = mysqli_query($db_con, "select * from matriculas_bach where id = '{$id}'");
    if ($datos_ya = mysqli_fetch_object($result)) {
        $naci = explode("-", $datos_ya->nacimiento);
        $nacimiento = "{$naci['2']}-{$naci['1']}-{$naci['0']}";
        $apellidos = $datos_ya->apellidos;
        $id = $datos_ya->id;
        $nombre = $datos_ya->nombre;