Beispiel #1
0
function printPDF($res, $res2, $data)
{
    $pdf = new Cezpdf("LETTER");
    $pdf->ezSetMargins(72, 30, 50, 30);
    $pdf->selectFont('Helvetica');
    $opts = array('justification' => "center");
    $pdf->ezText($res['facility_address'], "", $opts);
    $pdf->ezText("\n" . $res2['patient_name'] . "\n" . xl('Date of Birth') . ": " . $res2['patient_DOB'] . "\n" . $res2['patient_address']);
    $pdf->ezText("\n");
    $opts = array('maxWidth' => 550, 'fontSize' => 8);
    $pdf->ezTable($data, "", $title, $opts);
    $pdf->ezText("\n\n\n\n" . xl('Signature') . ":________________________________", "", array('justification' => 'right'));
    $pdf->ezStream();
}
Beispiel #2
0
function printPDF($res, $res2, $data)
{
    require_once $GLOBALS['fileroot'] . "/library/classes/class.ezpdf.php";
    $pdf = new Cezpdf("LETTER");
    $pdf->ezSetMargins(72, 30, 50, 30);
    $pdf->selectFont($GLOBALS['fileroot'] . "/library/fonts/Helvetica.afm");
    $opts = array('justification' => "center");
    $pdf->ezText($res['facility_address'], "", $opts);
    $pdf->ezText("\n" . $res2['patient_name'] . "\n" . xl('Date of Birth') . ": " . $res2['patient_DOB'] . "\n" . $res2['patient_address']);
    $pdf->ezText("\n");
    $opts = array('maxWidth' => 550, 'fontSize' => 8);
    $pdf->ezTable($data, "", $title, $opts);
    $pdf->ezText("\n\n\n\n" . xl('Signature') . ":________________________________", "", array('justification' => 'right'));
    $pdf->ezStream();
}
Beispiel #3
0
 function generar_pdf()
 {
     require_once toba_dir() . '/php/3ros/ezpdf/class.ezpdf.php';
     $pdf = new Cezpdf();
     $pdf->selectFont(toba_dir() . '/php/3ros/ezpdf/fonts/Helvetica.afm');
     $pdf->ezText('Ejemplo Firma Digital. Tiene dos attachments XML', 14);
     //-- Cuadro con datos
     $opciones = array('splitRows' => 0, 'rowGap' => 1, 'showHeadings' => true, 'titleFontSize' => 9, 'fontSize' => 10, 'shadeCol' => array(0.9, 0.9, 0.9), 'outerLineThickness' => 0.7, 'innerLineThickness' => 0.7, 'xOrientation' => 'center', 'width' => 500);
     $this->s__datos_juegos = toba::db()->consultar("SELECT * from ref_juegos");
     $pdf->ezTable($this->s__datos_juegos, '', 'Juegos', $opciones);
     $this->s__datos_deportes = toba::db()->consultar("SELECT * from ref_deportes");
     $pdf->ezTable($this->s__datos_deportes, '', 'Deportes', $opciones);
     $tmp = $pdf->ezOutput(0);
     $this->s__pdf = array();
     $sesion = get_firmador()->generar_sesion();
     $this->s__pdf['path'] = toba::proyecto()->get_path_temp() . "/doc{$sesion}_sinfirma.pdf";
     if (!file_put_contents($this->s__pdf['path'], $tmp)) {
         throw new toba_error("Imposible escribir en '{$this->s__pdf['path']}'. Chequee permisos");
     }
 }
 function saldenliste_mv_pdf($monat, $jahr)
 {
     ob_clean();
     // ausgabepuffer leeren
     /* PDF AUSGABE */
     //include_once ('pdfclass/class.ezpdf.php');
     $pdf = new Cezpdf('a4', 'portrait');
     $pdf->selectFont('Helvetica.afm');
     $pdf->ezSetCmMargins(4.5, 0, 0, 0);
     /* Kopfzeile */
     $pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
     $pdf->setLineStyle(0.5);
     $pdf->addText(86, 743, 6, "BERLUS HAUSVERWALTUNG * Fontanestr. 1 * 14193 Berlin * Inhaber Wolfgang Wehrheim * Telefon: 89784477 * Fax: 89784479 * Email: info@berlus.de");
     $pdf->line(42, 750, 550, 750);
     /* Footer */
     $pdf->line(42, 50, 550, 50);
     $pdf->addText(170, 42, 6, "BERLUS HAUSVERWALTUNG *  Fontanestr. 1 * 14193 Berlin * Inhaber Wolfgang Wehrheim");
     $pdf->addText(150, 35, 6, "Bankverbindung: Dresdner Bank Berlin * BLZ: 100  800  00 * Konto-Nr.: 05 804 000 00 * Steuernummer: 24/582/61188");
     $pdf->addInfo('Title', "Saldenliste {$objekt_name} {$monatname} {$jahr}");
     $pdf->addInfo('Author', $_SESSION[username]);
     $pdf->ezStartPageNumbers(550, 755, 7, '', "Seite {PAGENUM} von {TOTALPAGENUM}");
     // echo "Monatsbericht Mieter - Monatsbericht Kostenkonten<br>";
     // echo "<h3>Aktuelle Mieterstatistik mit ausgezogene Mieter<br></h3>";
     $s = new statistik();
     $jahr = $_REQUEST[jahr];
     if (empty($jahr)) {
         $jahr = date("Y");
     } else {
         if (strlen($jahr) < 4) {
             $jahr = date("Y");
         }
     }
     // $jahr_monat = date("Y-m");
     // $jahr = date("Y");
     $monat = $_REQUEST[monat];
     if (empty($monat)) {
         $monat = date("m");
     } else {
         if (strlen($monat) < 2) {
             $monat = '0' . $monat;
         }
     }
     // $monat = '04';
     $jahr_monat = $jahr . '-' . $monat;
     // $jahr_vormonat = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
     // $jahr_vormonat = date("Y-m",$jahr_vormonat);
     $bg = new berlussimo_global();
     $link = "?daten=mietvertrag_raus&mietvertrag_raus=saldenliste";
     $bg->objekt_auswahl_liste($link);
     $bg->monate_jahres_links($jahr, $link);
     if (isset($_SESSION['objekt_id'])) {
         $objekt_id = $_SESSION['objekt_id'];
         $einheit_info = new einheit();
         $o = new objekt();
         $objekt_name = $o->get_objekt_name($objekt_id);
         $monatname = monat2name($monat);
         $pdf->addText(70, 755, 10, "Saldenliste {$objekt_name} {$monatname} {$jahr}");
         $pdf->ezSetDy(25);
         $pdf->ezSetCmMargins(3, 3, 3, 3);
         $text_options = array(left => 0, justification => 'left');
         $pdf->ezText("<b>Einheit</b>", 8, $text_options);
         $pdf->ezSetDy(9);
         $text_options = array(left => 100, justification => 'left');
         $pdf->ezText("<b>Mieter</b>", 8, $text_options);
         $pdf->ezSetDy(9);
         $text_options = array(left => 270, justification => 'left');
         $pdf->ezText("<b>Einzug</b>", 8, $text_options);
         $pdf->ezSetDy(9);
         $text_options = array(left => 320, justification => 'left');
         $pdf->ezText("<b>Auszug</b>", 8, $text_options);
         $pdf->ezSetDy(9);
         $text_options = array(right => 0, justification => 'right');
         $pdf->ezText("<b>SALDO EUR</b>", 8, $text_options);
         /* Aktuell bzw. gewünschten Monat berechnen */
         $ob = new objekt();
         $einheiten_array = $ob->einheiten_objekt_arr($objekt_id);
         // $einheiten_array = $s->vermietete_monat_jahr($jahr_monat,$objekt_id, '');
         /*
          * echo "<pre>";
          * print_r($einheiten_array);
          * echo "<h1> EINHEITEN: $anzahl_aktuell</h1>";
          * $mv_array = $einheit_info->get_mietvertrag_ids('7');
          * print_r($mv_array);
          */
         $summe_sv = 0;
         $summe_mieten = 0;
         $summe_umlagen = 0;
         $summe_akt_gsoll = 0;
         $summe_g_zahlungen = 0;
         $summe_saldo_neu = 0;
         $anzahl_aktuell = count($einheiten_array);
         $miete = new miete();
         $zeilen_pro_seite = 60;
         $aktuelle_zeile = 0;
         for ($i = 0; $i < $anzahl_aktuell; $i++) {
             $mv_array = $einheit_info->get_mietvertraege_bis("" . $einheiten_array[$i]['EINHEIT_ID'] . "", $jahr, $monat);
             $mv_anzahl = count($mv_array);
             if (is_array($mv_array)) {
                 for ($b = 0; $b < $mv_anzahl; $b++) {
                     $mv_id = $mv_array[$b]['MIETVERTRAG_ID'];
                     $mk = new mietkonto();
                     $mieter_ids = $mk->get_personen_ids_mietvertrag($mv_id);
                     for ($a = 0; $a < count($mieter_ids); $a++) {
                         $mieter_daten_arr[] = $mk->get_person_infos($mieter_ids[$a][PERSON_MIETVERTRAG_PERSON_ID]);
                     }
                     // $miete->mietkonto_berechnung_monatsgenau($mv_id, $jahr, $monat);
                     $end_saldoo = $miete->saldo_berechnen_monatsgenau($mv_id, $monat, $jahr);
                     $zeile = $zeile + 1;
                     $einheit_kurzname = $einheiten_array[$i]['EINHEIT_KURZNAME'];
                     $vn = RTRIM(LTRIM($mieter_daten_arr['0']['0']['PERSON_VORNAME']));
                     $nn = RTRIM(LTRIM($mieter_daten_arr['0']['0']['PERSON_NACHNAME']));
                     $akt_gesamt_soll = $miete->saldo_vormonat_stand + $miete->sollmiete_warm;
                     $this->get_mietvertrag_infos_aktuell($mv_id);
                     $l_tag_akt_monat = letzter_tag_im_monat($monat, $jahr);
                     $l_datum = "{$jahr}-{$monat}-{$l_tag_akt_monat}";
                     if ($this->mietvertrag_bis == '0000-00-00' or $this->mietvertrag_bis > $l_datum) {
                         $mv_bis = 'aktuell';
                     } else {
                         $mv_bis = date_mysql2german($this->mietvertrag_bis);
                     }
                     $mv_von = date_mysql2german($this->mietvertrag_von);
                     $end_saldoo = nummer_punkt2komma($end_saldoo);
                     if ($mv_bis == 'aktuell') {
                         // echo "$zeile. $einheit_kurzname $nn $vn SALDO NEU: $end_saldoo <br>";
                         $pdf->ezSetCmMargins(3, 3, 3, 3);
                         $text_options = array(left => 0, justification => 'left');
                         $pdf->ezText("{$einheit_kurzname}", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(left => 100, justification => 'left');
                         $pdf->ezText("{$nn} {$vn}", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(left => 270, justification => 'left');
                         $pdf->ezText("{$mv_von}", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(left => 320, justification => 'left');
                         $pdf->ezText("", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(right => 0, justification => 'right');
                         $pdf->ezText("{$end_saldoo}", 8, $text_options);
                         $aktuelle_zeile++;
                     } else {
                         // echo "<b>$zeile. $einheit_kurzname $nn $vn SALDO NEU: $end_saldoo € BEENDET AM :$mv_bis €</b><br>";
                         $pdf->ezSetCmMargins(3, 3, 3, 3);
                         $text_options = array(left => 0, justification => 'left');
                         $pdf->ezText("{$einheit_kurzname}", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(left => 100, justification => 'left');
                         $pdf->ezText("{$nn} {$vn}", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(left => 270, justification => 'left');
                         $pdf->ezText("{$mv_von}", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(left => 320, justification => 'left');
                         $pdf->ezText("{$mv_bis}", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(right => 0, justification => 'right');
                         $pdf->ezText("{$end_saldoo}", 8, $text_options);
                         $aktuelle_zeile++;
                     }
                     if ($zeilen_pro_seite == $aktuelle_zeile) {
                         $pdf->ezNewPage();
                         /* Kopfzeile */
                         $pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
                         $pdf->setLineStyle(0.5);
                         $pdf->addText(86, 743, 6, "BERLUS HAUSVERWALTUNG * Fontanestr. 1 * 14193 Berlin * Inhaber Wolfgang Wehrheim * Telefon: 89784477 * Fax: 89784479 * Email: info@berlus.de");
                         $pdf->line(42, 750, 550, 750);
                         /* Footer */
                         $pdf->line(42, 50, 550, 50);
                         $pdf->addText(170, 42, 6, "BERLUS HAUSVERWALTUNG *  Fontanestr. 1 * 14193 Berlin * Inhaber Wolfgang Wehrheim");
                         $pdf->addText(150, 35, 6, "Bankverbindung: Dresdner Bank Berlin * BLZ: 100  800  00 * Konto-Nr.: 05 804 000 00 * Steuernummer: 24/582/61188");
                         $pdf->addInfo('Title', "Saldenliste {$objekt_name} {$monatname} {$jahr}");
                         $pdf->addText(70, 755, 10, "Saldenliste  {$objekt_name} {$monatname} {$jahr}");
                         $pdf->ezStartPageNumbers(550, 755, 7, '', "Seite {PAGENUM} von {TOTALPAGENUM}");
                         /* Überschriftzeile */
                         $pdf->ezSetDy(-18);
                         $pdf->ezSetCmMargins(3, 3, 3, 3);
                         $text_options = array(left => 0, justification => 'left');
                         $pdf->ezText("<b>Einheit</b>", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(left => 100, justification => 'left');
                         $pdf->ezText("<b>Mieter</b>", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(left => 270, justification => 'left');
                         $pdf->ezText("<b>Einzug</b>", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(left => 320, justification => 'left');
                         $pdf->ezText("<b>Auszug</b>", 8, $text_options);
                         $pdf->ezSetDy(9);
                         $text_options = array(right => 0, justification => 'right');
                         $pdf->ezText("<b>SALDO EUR</b>", 8, $text_options);
                         $aktuelle_zeile = 0;
                     }
                     unset($mieter_daten_arr);
                     unset($nn);
                     unset($vn);
                 }
                 // end if is_array mv_ids
             }
         }
         // hinweis_ausgeben("Saldenliste mit Vormieter für $objekt_name wurde erstellt<br>");
         ob_clean();
         // ausgabepuffer leeren
         $pdf->ezStopPageNumbers();
         $pdf->ezStream();
         /* Falls kein Objekt ausgewählt */
     } else {
         echo "Objekt auswählen";
     }
 }
Beispiel #5
0
    // Baca input tanggal yang dikirimkan user
    $mulai = $_POST[thn_mulai] . '-' . $_POST[bln_mulai] . '-' . $_POST[tgl_mulai];
    $selesai = $_POST[thn_selesai] . '-' . $_POST[bln_selesai] . '-' . $_POST[tgl_selesai];
    // Query untuk merelasikan kedua tabel di filter berdasarkan tanggal
    $sql = mysql_query("SELECT orders.id_orders as faktur,DATE_FORMAT(tgl_order, '%d-%m-%Y') as tanggal,\n                    nama_produk,jumlah,harga \n                    FROM orders, orders_detail, produk  \n                    WHERE (orders_detail.id_produk=produk.id_produk) \n                    AND (orders_detail.id_orders=orders.id_orders) \n                    AND (orders.status_order='Lunas') \n                    AND (orders.tgl_order BETWEEN '{$mulai}' AND '{$selesai}')");
    $jml = mysql_num_rows($sql);
    if ($jml > 0) {
        $i = 1;
        while ($r = mysql_fetch_array($sql)) {
            $quantityharga = rp($r[jumlah] * $r[harga]);
            $hargarp = rp($r[harga]);
            $faktur = $r[faktur];
            $data[$i] = array('<b>No</b>' => $i, '<b>Faktur</b>' => $faktur, '<b>Tanggal</b>' => $r[tanggal], '<b>Nama Produk</b>' => $r[nama_produk], '<b>Qty</b>' => $r[jumlah], '<b>Harga</b>' => $hargarp, '<b>Sub Total</b>' => $quantityharga);
            $total = $total + $r[jumlah] * $r[harga];
            $totqu = $totqu + $r[jumlah];
            $i++;
        }
        $pdf->ezTable($data, '', '', '');
        $tot = rp($total);
        $pdf->ezText("\n\nTotal keseluruhan : Rp. {$tot}");
        $pdf->ezText("\nJumlah yang terjual : {$jml} unit");
        $pdf->ezText("Jumlah keseluruhan yg terjual: {$totqu} unit");
        // Penomoran halaman
        $pdf->ezStartPageNumbers(320, 15, 8);
        $pdf->ezStream();
    } else {
        $m = $_POST[tgl_mulai] . '-' . $_POST[bln_mulai] . '-' . $_POST[thn_mulai];
        $s = $_POST[tgl_selesai] . '-' . $_POST[bln_selesai] . '-' . $_POST[thn_selesai];
        echo "Tidak ada transaksi/order pada Tanggal {$m} s/d {$s}";
    }
}
Beispiel #6
0
    $q->addWhere('project_id=' . (int) $project_id);
    $pname = 'Project: ' . $q->loadResult();
} else {
    $pname = $AppUI->_('All Projects');
}
if ($err = db_error()) {
    $AppUI->setMsg($err, UI_MSG_ERROR);
    $AppUI->redirect();
}
$font_dir = W2P_BASE_DIR . '/lib/ezpdf/fonts';
require $AppUI->getLibraryClass('ezpdf/class.ezpdf');
$pdf = new Cezpdf($paper = 'A4', $orientation = 'landscape');
$pdf->ezSetCmMargins(1, 2, 1.5, 1.5);
$pdf->selectFont($font_dir . '/Helvetica.afm');
if ($locale_char_set == 'utf-8' && function_exists('utf8_decode')) {
    $pdf->ezText(utf8_decode(w2PgetConfig('company_name')), 12);
} else {
    $pdf->ezText(w2PgetConfig('company_name'), 12);
}
$date = new CDate();
$pdf->ezText("\n" . $date->format($df), 8);
$next_week = new CDate($date);
$next_week->addSpan(new Date_Span(array(7, 0, 0, 0)));
$pdf->selectFont($font_dir . '/Helvetica-Bold.afm');
$pdf->ezText("\n" . $AppUI->_('Project Upcoming Task Report'), 12);
if ($locale_char_set == 'utf-8' && function_exists('utf8_decode')) {
    $pdf->ezText(utf8_decode($pname), 15);
} else {
    $pdf->ezText($pname, 15);
}
$pdf->ezText($AppUI->_('Tasks Due to be Completed By') . ' ' . $next_week->format($df), 10);
Beispiel #7
0
            ?>
        <script language='JavaScript'>
        var win = top.printLogPrint ? top : opener.top;
        win.printLogPrint(window);
        </script>
	</div>
        </body>
        </html>
<?php 
            exit;
        } else {
            //print letterhead to pdf
            $pdf = new Cezpdf();
            $pdf->selectFont('Times-Bold');
            $pdf->ezSetCmMargins(3, 1, 1, 1);
            $pdf->ezText($physician_name, 12);
            $pdf->ezText($practice_address, 12);
            $pdf->ezText($practice_city . ', ' . $practice_state . ' ' . $practice_zip, 12);
            $pdf->ezText($practice_phone . ' (' . xl('Voice') . ')', 12);
            $pdf->ezText($practice_phone . ' (' . xl('Fax') . ')', 12);
            $pdf->ezText('', 12);
            $pdf->ezText(date("l, F jS, Y"), 12);
            $pdf->ezText('', 12);
            $pdf->selectFont('Helvetica');
            $pdf->ezText($content, 10);
            $pdf->selectFont('Times-Bold');
            $pdf->ezText('', 12);
            $pdf->ezText('', 12);
            if ($_GET['signer'] == 'patient') {
                $pdf->ezText("__________________________________________________________________________________", 12);
                $pdf->ezText(xl("Print name, sign and date."), 12);
Beispiel #8
0
$encbarcode = $root_path . 'cache/barcodes/en_' . $enc . '.png';
# Patch for empty file names 2004-05-2 EL
if (empty($encounter['photo_filename'])) {
    $idpic = $root_path . 'fotos/registration/_nothing_';
} else {
    $idpic = $root_path . 'fotos/registration/' . $encounter['photo_filename'];
}
if ($lang == 'ar' || $lang == 'fa') {
    // for arabic lang, added  by Waleed Fathalla at 06/03/2004
    # Load the page header #1
    require '../std_plates/pageheader1ar.php';
    # Load the patient data plate #1
    require '../std_plates/patientdata1ar.php';
    $data = NULL;
    # make empty line
    $y = $pdf->ezText("\n", 14);
    $data[] = array(ar2uni($LDPatientData));
    $pdf->ezTable($data, '', '', array('xPos' => 'left', 'xOrientation' => 'right', 'showLines' => 0, 'fontSize' => $report_titlesize, 'showHeadings' => 0, 'shaded' => 2, 'shadeCol2' => array(0.9, 0.9, 0.9), 'width' => 555, 'cols' => array(0 => array('justification' => 'right'))));
    # make empty line
    $y = $pdf->ezText("\n", 14);
    # reset
    $data = NULL;
    $data[] = array(formatDate2Local($encounter['encounter_date'], $date_format), ar2uni("{$LDAdmitDate} :"));
    $data[] = array(formatDate2Local($encounter['encounter_date'], $date_format, TRUE, TRUE), ar2uni("{$LDAdmitTime} :"));
    $data[] = array('');
    $data[] = array(ar2uni($encounter['title']), ar2uni("{$LDTitle} :"));
    $data[] = array($encounter['sex'], ar2uni("{$LDSex} :"));
    $data[] = array($encounter['blood_group'], ar2uni("{$LDBloodGroup} :"));
    $data[] = array(ar2uni($eclass), ar2uni("{$LDAdmitType} :"));
    if ($encounter['encounter_class_nr'] == 1) {
        $data[] = array(ar2uni($current_ward_name), ar2uni("{$LDWard} :"));
$pdf->line(10, 50, 578, 50);
// Teks kiri bawah
$pdf->addText(30, 34, 8, 'Dicetak tgl:' . date('d-m-Y, H:i:s'));
$pdf->closeObject();
// Tampilkan object di semua halaman
$pdf->addObject($all, 'all');
// Koneksi ke database dan tampilkan datanya
include "../../../config/koneksi.php";
// Query untuk merelasikan kedua tabel
$nima = @$_POST['nim'];
$hts = substr(@$_POST['tahun'], 0, 4);
$ktr = @$_POST['semester'];
$hts = substr($_POST['tahun'], 0, 4);
$tampiljdwl = mysql_query("SELECT a.*,b.nmmatkul from jadwal a inner join matakuliah b on a.kdmatkul=b.kdmatkul AND a.tahun='{$hts}' order by a.hari desc");
$b = $_POST['tahun'] + 1;
$jml = mysql_num_rows($tampiljdwl);
if ($jml != 0) {
    $i = 1;
    while ($r = mysql_fetch_array($tampiljdwl)) {
        $data[$i] = array('<b>Tahun Ajaran</b>' => $r['tahun'], '<b>Kode-MK</b>' => $r['kdmatkul'], '<b>Nama-MK</b>' => $r['nmmatkul'], '<b>Kelas</b>' => $r['kdkelas'], '<b>Hari</b>' => $r['hari'], '<b>Jam Mulai</b>' => $r['jam_mulai'], '<b>Jam Selesai</b>' => $r['jam_selesai'], '<b>Kd.Dosen</b>' => $r['kode_dosen']);
        $ketua = $r['nmketua'];
        $i++;
    }
    $pdf->ezTable($data, '', '', '');
    $pdf->ezText("\n                                            Bandung," . date('d-m-Y'));
    // Penomoran halaman
    $pdf->ezStartPageNumbers(320, 15, 8);
    $pdf->ezStream();
} else {
    echo "Jadwal belum ada";
}
conectarse();
$pdf = new Cezpdf('a4');
$tmp = array('b' => 'Helvetica-Bold', 'i' => 'Helvetica-Oblique', 'bi' => 'Helvetica-BoldOblique', 'ib' => 'Helvetica-BoldOblique', 'bb' => 'Times-Roman');
$pdf->setFontFamily('helvetica', $tmp);
$pdf->selectFont('fonts/helvetica.afm');
$pdf->ezSetCmMargins(1, 1, 1.5, 1.5);
//Data loading
$sql = "select p.clave_producto,p.nombre_producto,prov.nombre,\n    p.cantidad_actual,p.status\n    from productos p\n    inner join proveedores prov on prov.clave_proveedor = p.proveedor \n    GROUP BY nombre \n    ORDER BY p.clave_producto ASC ";
$rs = mysql_query($sql);
if (mysql_num_rows($rs) > 0) {
    $ixx = 0;
    while ($datatmp = mysql_fetch_assoc($rs)) {
        $ixx = $ixx + 1;
        $data[] = array_merge($datatmp, array('clave_producto' => $ixx));
    }
}
$titles = array('clave_producto' => '<b>Id</b>', 'nombre_producto' => '<b>Nombre Producto</b>', 'nombre' => '<b>Proveedor</b>', 'cantidad_actual' => '<b>Cantidad Actual</b>', 'status' => '<b>Estado</b>');
$options = array('shadeCol' => array(0.9, 0.9, 0.9), 'xOrientation' => 'center', 'width' => 580, 'shadeHeadingCol' => array(0.6, 0.6, 0.5), 'justification' => 'center', 'cols' => array('clave_producto' => array('justification' => 'center'), 'nombre_producto' => array('justification' => 'center'), 'nombre' => array('justification' => 'center'), 'cantidad_actual' => array('justification' => 'center')));
$pdf->ezImage('../img/libro.jpg', 0, 60, 'none', 'left');
$pdf->line($pdf->ez['leftMargin'], $pdf->ez['bottomMargin'] + 10, $pdf->ez['pageWidth'] - $pdf->ez['rightMargin'], $pdf->ez['bottomMargin'] + 10);
//the bottom line
$pdf->addText(200, 790, 12, "<b>Distribuciones y Representaciones Arvizu </b>\n");
$pdf->addText(250, 770, 12, "<i>!Leer Aumenta el Saber! </i>\n");
$pdf->ezText("Estado de Productos\n", 16, array('left' => '200'));
$pdf->ezTable($data, $titles, '', $options);
$pdf->ezText("\n\n\n", 10);
$pdf->addText(50, 30, 8, "<b>Fecha: </b>\n" . date("d/m/Y"));
$pdf->ezStartPageNumbers($pdf->ez['pageWidth'] - ($pdf->ez['rightMargin'] - 10), $pdf->ez['bottomMargin'], 8, 'PAGINA', '{PAGENUM} de {TOTALPAGENUM}', 1);
$pdf->addText(50, 30, 10);
//bottom text
$pdf->ezStream();
Beispiel #11
0
$f = mysql_fetch_object($r);
include 'class.ezpdf.php';
$pdf = new Cezpdf('LETTER', 'portrait');
#					 t, b, l, r
$pdf->ezSetMargins(50, 70, 50, 50);
#w = 612 h = 792
$pdf->setColor(0.16, 0.38, 0.61);
$pdf->selectFont('fonts/Helvetica.afm');
$img = ImageCreatefromjpeg('../img/logo.jpg');
$pdf->addImage($img, 50, 697, 47, 50);
$pdf->addText(110, 722, 24, '<b>Paqueteria y Mensajeria en Movimiento</b>');
$pdf->setColor(0.79, 0.67, 0.11);
$pdf->addText(110, 702, 16, '<b>Convenio de venta de guias</b>');
$pdf->line(50, 690, 560, 690);
$pdf->setColor(0.25, 0.25, 0.25);
$pdf->ezText("\n\n\n\n{$f->fechaactual}", 12, array('justification' => 'right'));
$pdf->setColor(0.79, 0.67, 0.11);
$pdf->ezText("<b>DATOS DEL CLIENTE</b>", 12, array('justification' => 'left'));
$pdf->setColor(0.25, 0.25, 0.25);
$pdf->ezText(strtoupper("<b> NOMBRE:</b> {$f->ncliente}"), 10, array('justification' => 'left'));
$pdf->ezText(strtoupper("<b> DIRECCION:</b> {$f->calle} NO. {$f->numero}.    <b>COL:</b> {$f->colonia}.    <b>CP:</b> {$f->cp}"), 10, array('justification' => 'left'));
$pdf->ezText(strtoupper("<b> CIUDAD:</b> {$f->poblacion}.    <b>ESTADO:</b> {$f->estado}.    <b>PAIS:</b> {$f->pais} "), 10, array('justification' => 'left'));
$pdf->ezText(strtoupper("<b> TELEFONO:</b> {$f->telefono}.    <b>CELULAR:</b> {$f->celular}."), 10, array('justification' => 'left'));
$pdf->ezText(strtoupper("<b> EMAIL:</b> {$f->email}"), 10, array('justification' => 'left'));
#$pdf->line(50,590,560,590);
$s = "SELECT (SELECT COUNT(*) FROM cconvenio_servicios WHERE idconvenio = '{$_GET['folio']}' AND tipo = 'CONVENIO') c1,\n\t(SELECT COUNT(*) FROM cconvenio_servicios_sucursales WHERE idconvenio = '{$_GET['folio']}' AND tipo = 'SUCONVENIO') c2,\n\t(SELECT COUNT(*) FROM cconvenio_servicios_sucursales WHERE idconvenio = '{$_GET['folio']}' AND tipo = 'SRCONVENIO') c3";
$rx = mysql_query($s, $l) or die($s);
$fx = mysql_fetch_object($rx);
if ($f->precioporkg == 1 || $f->precioporcaja == 1 || $f->descuentosobreflete == 1 || $fx->c1 > 0 || $fx->c2 > 0 || $fx->c3 > 0) {
    $pdf->setColor(0.79, 0.67, 0.1);
    $pdf->ezText("<b>\nDATOS DEL CONVENIO PARA GUIAS DE VENTANILLA</b>", 12, array('justification' => 'left'));
Beispiel #12
0
 $vaKepada[] = array("1" => "", "2" => "", "3" => "", "4" => "NIP", "5" => ":", "6" => $vaLeader['nip']);
 $vaKepada[] = array("1" => "", "2" => "", "3" => "", "4" => "Jabatan", "5" => ":", "6" => $vaLeader['jabatan']);
 foreach ($vaPengikut as $key => $vaData) {
     $vaPengikut_Gol = scSys::GetKeterangan("Title,Description", "Id = '{$vaData['golongan']}'", "sc_master");
     $vaKepada[] = array("1" => "", "2" => "", "3" => $nRow++ . ".", "4" => "Nama", "5" => ":", "6" => $vaData['nama']);
     $vaKepada[] = array("1" => "", "2" => "", "3" => "", "4" => "Pangkat / gol", "5" => ":", "6" => $vaPengikut_Gol['Description'] . " / " . $vaPengikut_Gol['Title']);
     $vaKepada[] = array("1" => "", "2" => "", "3" => "", "4" => "NIP", "5" => ":", "6" => $vaData['nip']);
     $vaKepada[] = array("1" => "", "2" => "", "3" => "", "4" => "Jabatan", "5" => ":", "6" => $vaData['jabatan']);
 }
 $vaUntuk = array();
 $vaUntuk[] = array("1" => "Untuk", "2" => ":", "3" => $dbRow['purpose']);
 $nFont = 11;
 $pdf = new Cezpdf("A4", "P", $vaOpt, '0');
 $pdf->ezImage(scSys::GetConfig("sc_header"), false, 100, 600);
 $pdf->ezTable($vaTable1, "", "", array("showLines" => 0, "showHeadings" => 0, "fontSize" => $nFont, "cols" => array("x" => array("width" => 60, "wrap" => 1), "1" => array("width" => 20, "wrap" => 1), "2" => array("width" => 2), "3" => array("width" => 18, "wrap" => 1))));
 $pdf->ezText("");
 $pdf->ezText("<u><b>PERINTAH PERJALANAN DINAS</b></u>", $nFont + 2, array("justification" => "center"));
 $pdf->ezText("(SPPD)", $nFont + 2, array("justification" => "center"));
 $pdf->ezText("");
 $pdf->ezTable($vaTable2, "", "", array("showLines" => 0, "showHeadings" => 0, "fontSize" => $nFont, "cols" => array("1" => array("width" => 4, "wrap" => 1), "2" => array("width" => 40, "wrap" => 1), "3" => array("width" => 56, "wrap" => 1))));
 $pdf->ezText("");
 $pdf->ezText("");
 $pdf->ezTable($vaTanggal, "", "", array("showLines" => 0, "showHeadings" => 0, "fontSize" => $nFont, "cols" => array("x" => array("width" => 50, "wrap" => 1), "1" => array("width" => 25, "wrap" => 1), "2" => array("width" => 2), "3" => array("width" => 23, "wrap" => 1))));
 $pdf->ezText("");
 $pdf->ezTable($vaTtd, "", "", array("showLines" => 0, "showHeadings" => 0, "fontSize" => $nFont, "cols" => array("x" => array("width" => 50, "wrap" => 1, "justification" => "center"), "1" => array("width" => 40, "wrap" => 1, "justification" => "center"))));
 $pdf->ezNewPage();
 $pdf->ezImage(scSys::GetConfig("sc_header"), false, 100, 600);
 $pdf->ezText("<u><b>SURAT PERINTAH TUGAS</b></u>", $nFont + 2, array("justification" => "center"));
 $pdf->ezText("NOMOR : ", $nFont + 2, array("justification" => "center"));
 $pdf->ezText("");
 $pdf->ezTable($vaDasar, "", "", array("showLines" => 0, "showHeadings" => 0, "fontSize" => $nFont, "cols" => array("1" => array("width" => 20, "wrap" => 1), "2" => array("width" => 2), "3" => array("wrap" => 1))));
Beispiel #13
0
    $allcat = $cats[0]->get_subcategories($stud_id, $course_code, $session_id);
    $alleval = $cats[0]->get_evaluations($stud_id, true);
    $alllink = $cats[0]->get_links($stud_id, true);
    if (isset($_GET['exportpdf'])) {
        $datagen = new GradebookDataGenerator($allcat, $alleval, $alllink);
        $header_names = array(get_lang('Name'), get_lang('Description'), get_lang('Weight'), get_lang('Date'), get_lang('Results'));
        $data_array = $datagen->get_data(GradebookDataGenerator::GDG_SORT_NAME, 0, null, true);
        $newarray = array();
        foreach ($data_array as $data) {
            $newarray[] = array_slice($data, 1);
        }
        $pdf = new Cezpdf();
        $pdf->selectFont(api_get_path(LIBRARY_PATH) . 'ezpdf/fonts/Courier.afm');
        $pdf->ezSetMargins(30, 30, 50, 30);
        $pdf->ezSetY(810);
        $pdf->ezText(get_lang('FlatView') . ' (' . api_convert_and_format_date(null, DATE_FORMAT_SHORT) . ' ' . api_convert_and_format_date(null, TIME_NO_SEC_FORMAT) . ')', 12, array('justification' => 'center'));
        $pdf->line(50, 790, 550, 790);
        $pdf->line(50, 40, 550, 40);
        $pdf->ezSetY(750);
        $pdf->ezTable($newarray, $header_names, '', array('showHeadings' => 1, 'shaded' => 1, 'showLines' => 1, 'rowGap' => 3, 'width' => 500));
        $pdf->ezStream();
        exit;
    }
} else {
    //Student view
    //in any other case (no search, no pdf), print the available gradebooks
    // Important note: loading a category will actually load the *contents* of
    // this category. This means that, to show the categories of a course,
    // we have to show the root category and show its subcategories that
    // are inside this course. This is done at the time of calling
    // $cats[0]->get_subcategories(), not at the time of doing Category::load()
$pdf->closeObject();
// Tampilkan object di semua halaman
$pdf->addObject($all, 'all');
// Baca input tanggal yang dikirimkan user
$mulai = $_GET[tgl1];
$selesai = $_GET[tgl2];
// Koneksi ke database dan tampilkan datanya
// Query untuk merelasikan kedua tabel di filter berdasarkan tanggal
$sql = mysql_query("select kd_penj.tanggal,kd_penj.kd_pjl,penjualan.id_product,barang.nama,\n                                           penjualan.harga,penjualan.jumlah,penjualan.subtotal\n                                           from penjualan,kd_penj,barang\n                                           where kd_penj.kd_pjl=penjualan.id_transaksi and barang.kode=penjualan.id_product and kd_penj.tanggal\n\t\t\t\t\t\t\t\t\t\t between '{$mulai}' and '{$selesai}'\n\t\t\t\t\t");
$sum = mysql_fetch_array(mysql_query("SELECT sum(total) as total from \n\t\tkd_penj where tanggal between '{$mulai}' and '{$selesai}'"));
$jml = mysql_num_rows($sql);
if ($jml > 0) {
    $i = 1;
    while ($r = mysql_fetch_array($sql)) {
        $hargarp = rp($r[4]);
        $subrp = rp($r[6]);
        $data[$i] = array('<b>No</b>' => $i, '<b>Tanggal</b>' => $r[0], '<b>Kode Transaksi</b>' => $r[1], '<b>Nama Barang</b>' => $r[3], '<b>Harga</b>' => $hargarp, '<b>Jumlah</b>' => $r[5], '<b>SubTotal</b>' => $subrp);
        $i++;
    }
    $pdf->ezTable($data, '', '', '');
    $tot = rp($sum[total]);
    $pdf->ezText("\n\nTotal keseluruhan : Rp. {$tot}");
    $pdf->ezText("Pencarian dari Tanggal {$mulai} s/d {$selesai}");
    // Penomoran halaman
    $pdf->ezStartPageNumbers(320, 15, 8);
    $pdf->ezStream();
} else {
    $m = $_POST[tgl_1] . '-' . $_POST[bln_1] . '-' . $_POST[thn_1];
    $s = $_POST[tgl_2] . '-' . $_POST[bln_2] . '-' . $_POST[thn_2];
    echo "<script>window.alert('Tidak ada laporan Penjualan pada Tanggal {$m} s/d {$s}');\n  window.location=('" . $uri . "/apotek/out.php')</script>";
}
Beispiel #15
0
        $stud_fn = $user['firstname'];
        $stud_ln = $user['lastname'];
        $certif_text = sprintf(get_lang('CertificateWCertifiesStudentXFinishedCourseYWithGradeZ'), $organization_name, $stud_fn . ' ' . $stud_ln, $category[0]->get_name(), $scorecourse_display);
        $certif_text = str_replace("\\n", "\n", $certif_text);
        $date = api_convert_and_format_date(null, DATE_FORMAT_SHORT);
        $pdf = new Cezpdf('a4', 'landscape');
        $pdf->selectFont(api_get_path(LIBRARY_PATH) . 'ezpdf/fonts/Courier.afm');
        $pdf->ezSetMargins(30, 30, 50, 50);
        //line Y coordinates in landscape mode are upside down (500 is on top, 10 is on the bottom)
        $pdf->line(50, 50, 790, 50);
        $pdf->line(50, 550, 790, 550);
        $pdf->ezSetY(450);
        //@todo replace image
        //$pdf->ezImage(api_get_path(SYS_CODE_PATH).'img/dokeos_logo_certif.png',1,400,'','center','');
        $pdf->ezSetY(480);
        $pdf->ezText($certif_text, 28, array('justification' => 'center'));
        //$pdf->ezSetY(750);
        $pdf->ezSetY(50);
        $pdf->ezText($date, 18, array('justification' => 'center'));
        $pdf->ezSetY(580);
        $pdf->ezText($organization_name, 22, array('justification' => 'left'));
        $pdf->ezSetY(580);
        $pdf->ezText($portal_name, 22, array('justification' => 'right'));
        $pdf->ezStream();
    }
    exit;
} else {
    $cats = Category::load($category);
    $stud_id = api_is_allowed_to_edit() ? null : api_get_user_id();
    $allcat = $cats[0]->get_subcategories($stud_id);
    $alleval = $cats[0]->get_evaluations($stud_id);
$pdf->selectFont('fonts/Helvetica.afm');
$pdf->ezSetCmMargins(1.5, 1, 2, 3);
$pdf->addJpegFromFile("../img/o.jpg", 50, 750, 100);
$folio = trim($_GET['folio']);
$result = mysql_query("select folio,fecha,c.nombre_contacto,total,\n\tconcat(nombre,' ',e.apellido_paterno,' ',e.apellido_materno) as nombre \n\tfrom ventas v inner join clientes c on c.matricula = v.cliente \n\tinner join empleados e on e.matricula = v.empleado \n\twhere v.status = 'PAGADA' and folio = '" . $folio . "' ");
while ($datatmp = mysql_fetch_array($result)) {
    $datos = $datatmp['nombre_contacto'];
    $total = $datatmp['total'];
    $emp = $datatmp['nombre'];
    $data[] = array_merge($datatmp, array('folio'));
}
$options = array('shadeHeadingCol' => array(0.6, 0.6, 0.5), 'shadeCol' => array(0.9, 0.9, 0.9), 'xOrientation' => 'right', 'width' => 70, 'fontSize' => 8, 'xPos' => 480);
$titlef = array('folio' => '<b>Folio</b>');
$titles = array('fecha' => '<b>Fecha</b>');
$titlet = array('total' => '<b>Total</b>');
$pdf->ezText("\n", 10);
$pdf->ezTable($data, $titlef, '', $options);
$pdf->ezText("\n", 10);
$pdf->ezTable($data, $titles, '', $options);
$pdf->ezText("\n", 10);
$pdf->addText(50, 700, 12, "<b>Atendio: </b>\n");
$pdf->addText(100, 700, 12, $emp);
$pdf->addText(50, 680, 12, "<b>Cliente: </b>\n");
$pdf->addText(100, 680, 12, $datos);
//RECUPERANDO DETALLE DE VENTA
$sql = mysql_query("select dv.cantidad,p.nombre,dv.precio,dv.subtotal \n \t\tfrom detalle_venta dv\n \t\tinner join platillos p on p.id_platillo = dv.clave_producto \n \t\twhere folio = '" . $folio . "' ");
while ($row = mysql_fetch_array($sql)) {
    $dat[] = array_merge($row);
}
$optionsdv = array('shadeHeadingCol' => array(0.6, 0.6, 0.5), 'shadeCol' => array(0.9, 0.9, 0.9), 'xOrientation' => 'center', 'width' => 500, 'fontSize' => 10, 'xPos' => 'center', 'cols' => array('cantidad' => array('justification' => 'center'), 'nombre' => array('justification' => 'center'), 'precio' => array('justification' => 'center'), 'subtotal' => array('justification' => 'center')));
$titledv = array('cantidad' => '<b>Cantidad</b>', 'nombre' => '<b>Descripción</b>', 'precio' => '<b>Precio</b>', 'subtotal' => '<b>SubTotal</b>');
ini_set('limit', -1);
include 'class.ezpdf.php';
$pdf = new Cezpdf('LETTER', 'portrait');
#					 t, b, l, r
$pdf->ezSetMargins(50, 70, 50, 50);
#w = 612 h = 792
$pdf->setColor(0.16, 0.38, 0.61);
$pdf->selectFont('fonts/Helvetica.afm');
$img = ImageCreatefromjpeg('../img/logo.jpg');
$pdf->addImage($img, 50, 697, 47, 50);
$pdf->addText(110, 722, 24, '<b>ENTREGAS PUNTUALES</b>');
$pdf->setColor(0.79, 0.67, 0.11);
$pdf->addText(110, 702, 16, '<b>Soporte de Factura ' . $_GET[folio] . '</b>');
$pdf->line(50, 690, 560, 690);
$pdf->setColor(0.25, 0.25, 0.25);
$pdf->ezText("\n\n\n\n{$f->fechaactual}", 12, array('justification' => 'right'));
#detallado superior
$s = "SELECT fd.*,SUBSTRING(CONCAT(cc.nombre,' ',cc.paterno,' ',cc.materno),1,25) cliente,gv.totalpaquetes,\n\t\tDATE_FORMAT(fd.fecha,'%d/%m/%Y') AS fecha\n\t\tFROM facturadetalle fd\n\t\tINNER JOIN guiasventanilla gv ON fd.folio=gv.id\n\t\tINNER JOIN catalogocliente cc ON gv.iddestinatario=cc.id\n\t\tWHERE fd.factura = '{$_GET['folio']}'\n\t\tUNION\n\t\tSELECT fd.*,SUBSTRING(CONCAT(cc.nombre,' ',cc.paterno,' ',cc.materno),1,25) cliente,ge.totalpaquetes,\n\t\tDATE_FORMAT(fd.fecha,'%d/%m/%Y') AS fecha\n\t\tFROM facturadetalle fd\n\t\tINNER JOIN guiasempresariales ge ON fd.folio=ge.id\n\t\tINNER JOIN catalogocliente cc ON ge.iddestinatario=cc.id\n\t\tWHERE fd.factura = '{$_GET['folio']}'";
$rx = mysql_query($s, $l) or die($s);
$registros = mysql_num_rows($rx);
if ($registros > 0) {
    $pdf->setColor(0.79, 0.67, 0.11);
    $pdf->ezText("<b>DETALLADO DE FACTURA, GUIAS</b>\n", 12, array('justification' => 'left'));
    $pdf->setColor(0.25, 0.25, 0.25);
    $s = "SELECT fd.*,SUBSTRING(CONCAT(cc.nombre,' ',cc.paterno,' ',cc.materno),1,25) cliente,gv.totalpaquetes,\n\t\tDATE_FORMAT(fd.fecha,'%d/%m/%Y') AS fecha\n\t\tFROM facturadetalle fd\n\t\tINNER JOIN guiasventanilla gv ON fd.folio=gv.id\n\t\tINNER JOIN catalogocliente cc ON gv.iddestinatario=cc.id\n\t\tWHERE fd.factura = '{$_GET['folio']}'\n\t\tUNION\n\t\tSELECT fd.*,SUBSTRING(CONCAT(cc.nombre,' ',cc.paterno,' ',cc.materno),1,25) cliente,ge.totalpaquetes,\n\t\tDATE_FORMAT(fd.fecha,'%d/%m/%Y') AS fecha\n\t\tFROM facturadetalle fd\n\t\tINNER JOIN guiasempresariales ge ON fd.folio=ge.id\n\t\tINNER JOIN catalogocliente cc ON ge.iddestinatario=cc.id\n\t\tWHERE fd.factura = '{$_GET['folio']}'";
    $r = mysql_query($s, $l) or die($s);
    $col = array('0' => "Folio", '1' => 'Remitente', '2' => '#Paqs', '3' => 'Fecha', '4' => 'Flete', '5' => 'Desc', '6' => 'Exced', '7' => 'EAD', '8' => 'Recol', '9' => 'Seguro', '10' => 'Combus', '11' => 'Otros', '12' => 'Subtotal', '13' => 'Iva', '14' => 'Iva Ret', '15' => 'Total');
    $opt = array('0' => array('justification' => 'left'), '1' => array('justification' => 'center'), '2' => array('justification' => 'center'), '3' => array('justification' => 'right'), '4' => array('justification' => 'right'), '5' => array('justification' => 'right'), '6' => array('justification' => 'right'), '7' => array('justification' => 'right'), '8' => array('justification' => 'right'), '9' => array('justification' => 'right'), '10' => array('justification' => 'right'), '11' => array('justification' => 'right'), '12' => array('justification' => 'right'), '13' => array('justification' => 'right'), '14' => array('justification' => 'right'), '15' => array('justification' => 'right'));
    $est = array('fontSize' => 5, 'showHeadings' => 1, 'lineCol' => array(0, 0, 0), 'cols' => $opt, 'width' => 520);
    $data = array();
    $tflete = 0;
Beispiel #18
0
<?php

if (@$_REQUEST['action'] == "getpdf") {
    mysql_connect("localhost", "root", "");
    mysql_select_db("cdcol");
    include 'Cezpdf.php';
    $pdf = new Cezpdf();
    $pdf->selectFont('/Applications/XAMPP/xamppfiles/lib/php/fonts/Helvetica.afm');
    $pdf->ezText('CD Collection', 14);
    $pdf->ezText('Copyright 2002-2013 Kai Seidler, oswald@apachefriends.org, GPL', 10);
    $pdf->ezText('', 12);
    $result = mysql_query("SELECT id,titel,interpret,jahr FROM cds ORDER BY interpret;");
    $i = 0;
    while ($row = mysql_fetch_array($result)) {
        $data[$i] = array('interpret' => $row['interpret'], 'titel' => $row['titel'], 'jahr' => $row['jahr']);
        $i++;
    }
    $pdf->ezTable($data, "", "", array('width' => 500));
    $pdf->ezStream();
    exit;
}
include "langsettings.php";
?>
<html>
<head>
<title>apachefriends.org cd collection</title>
<link href="xampp.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php

include 'class.ezpdf.php';
$pdf = new Cezpdf('LETTER');
$pdf->selectFont('fonts/Helvetica.afm');
$pdf->ezSetCmMargins(1, 1, 1.5, 1.5);
$conexion = mysql_connect("localhost", "root", "");
mysql_select_db("inventario", $conexion);
$queEmp = "SELECT * FROM acceso_sis where user = user order by user asc";
//  agregar la tabla que vas a imprimir
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
$ixx = 0;
while ($datatmp = mysql_fetch_assoc($resEmp)) {
    $ixx = $ixx + 1;
    $data[] = array_merge($datatmp, array('num' => $ixx));
}
// son todos los campos de la tabla-nombre de como se imprime
$titles = array('num' => '<b>N°</b>', 'user' => '<b>Codigo de Usuario</b>', 'pass' => '<b>Contraseña encriptada</b>');
$options = array('shadeCol' => array(3, 3, 3), 'xOrientation' => 'center', 'width' => 580);
$txttit = "<b>Pasteleria Elisua´s</b>\n";
$txttit .= "Reporte de Usuario \n";
$pdf->ezText($txttit, 12, array('justification' => 'center'));
$pdf->ezTable($data, $titles, '', $options);
$pdf->ezText("\n\n\n", 10);
$pdf->ezText("<b>Fecha:</b> " . date("d/m/Y"), 10);
$pdf->ezText("<b>Hora:</b> " . date("H:i:s") . "\n\n", 10);
$pdf->ezText("Pasteleria Elisua´s CopyRight 2015 \n");
$pdf->ezStream();
Beispiel #20
0
 // The column sizes are where the product listing columns start on the
 // PDF page, if you make the TABLE HEADER FONT SIZE any larger you will
 // need to tweak these values to prevent text from clashing together
 define('PRODUCTS_COLUMN_SIZE', '450');
 define('PRODUCT_LISTING_BKGD_COLOR', GREY);
 define('MODEL_COLUMN_SIZE', '37');
 define('PRICING_COLUMN_SIZES', '67');
 $vilains = array("&#224;", "&#225;", "&#226;", "&#227;", "&#228;", "&#229;", "&#230;", "&#231;", "&#232;", "&#233;", "&#234;", "&#235;", "&#236;", "&#237;", "&#238;", "&#239;", "&#240;", "&#241;", "&#242;", "&#243;", "&#244;", "&#245;", "&#246;", "&#247;", "&#248;", "&#249;", "&#250;", "&#251;", "&#252;", "&#253;", "&#254;", "&#255;", "&#223;", "&#39;", "&nbsp;", "&agrave;", "&aacute;", "&atilde;", "&auml;", "&Arond;", "&egrave;", "&aelig;", "&ecirc;", "&euml;", "&igrave;", "&iacute;", "&Iacute;", "&icirc;", "&iuml;", "&ograve;", "&oacute;", "&ocirc;", "&otilde;", "&ouml;", "&oslash;", "&ugrave;", "&uacute;", "&ucirc;", "&uuml;", "&ntilde;", "&ccedil;", "&yacute;", "&lt;", "&gt;", "&amp;");
 $cools = array('à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ', 'ß', '\'', ' ', 'à', 'á', 'ã', 'ä', 'å', 'è', 'æ', 'ê', 'ë', 'ì', 'í', 'î', 'Î', 'ï', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ñ', 'ç', 'ý', '<', '>', '&');
 $currencies = new currencies();
 //$pdf->setPreferences(array("HideToolbar" => 'false', "HideWindowUI" => 'false'));
 $pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
 $pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
 // company name and details pulled from the my store address and phone number
 // in admin configuration mystore
 $y = $pdf->ezText(STORE_NAME_ADDRESS, COMPANY_HEADER_FONT_SIZE);
 $y -= 10;
 // logo image  set to right of the above .. change first number to move sideways
 //$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'invoicelogo.jpg',365,730,85,85);
 // extra info boxs to be used by staff
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(0.5);
 $pdf->Rectangle(300, 745, 250, 70);
 $pdf->addText(310, 785, GENERAL_FONT_SIZE, TEXT_PACKED_BY);
 $pdf->addText(310, 760, GENERAL_FONT_SIZE, TEXT_VERIFIED_BY);
 // line between header order number and order date
 $pdf->setLineStyle(0.5);
 $pdf->line(LEFT_MARGIN, $y, LINE_LENGTH, $y);
 $pdf->ezSetY($y);
 $dup_y = $y;
 // order number
$jml = mysql_num_rows($sql);
if ($jml != 0) {
    $i = 1;
    while ($r = mysql_fetch_array($sql)) {
        $mutu = $r['sks'] * $r['angkamutu'];
        $data[$i] = array('<b>No</b>' => $i, '<b>Kode Mata Kuliah</b>' => $r['kdmatkul'], '<b>Nama Mata Kuliah</b>' => $r['nmmatkul'], '<b>SKS</b>' => $r['sks'], '<b>Huruf Mutu</b>' => $r['nilai'], '<b>Angka Mutu</b>' => $r['angkamutu'], '<b>Mutu</b>' => $mutu);
        $totalsks = $totalsks + $r[sks];
        $totalmutu = $totalmutu + $mutu;
        $nm = $r['nim'];
        $nam = $r['nama'];
        $ketua = $r['nmketua'];
        $jur = $r['nmjur'];
        $ktrg = $r['ket'];
        $i++;
    }
    $pdf->ezText("\nNIM                     : {$nm}");
    $pdf->ezText("\nNama Mahasiswa          : {$nam}");
    $pdf->ezText("\nJurusan                 : {$jur}");
    $pdf->ezText("\nTahun Ajaran            : {$tahuna}");
    $pdf->ezText("\nSemester                : {$semestera}");
    //$pdf->ezText("\nTahun Ajaran          : {$tah}/{$tah2}");
    //$pdf->ezText("\nSemester              : {$ktrg}");
    $pdf->ezText("\n");
    $ipk = $totalmutu / $totalsks;
    $pdf->ezTable($data);
    $pdf->ezText("\nTotal Mutu                     : {$totalmutu}");
    $pdf->ezText("\nTotal SKS                      : {$totalsks}");
    $pdf->ezText("\nIndeks Prestasi Semester (IPS) : {$ipk}");
    $pdf->ezText("\n                                            Bandung," . date('d-m-Y'));
    $pdf->ezText("                                          Ketua Jurusan");
    $pdf->ezText("\n");
Beispiel #22
0
 function acta($argumento)
 {
     $fecha_doc = $argumento["fecha_doc"];
     $usuarioAutorizaNomb = $argumento["usuarioAutorizaNomb"];
     //rint ($query);
     $pdf = new Cezpdf("LETTER", "portrait");
     //LETTER = Carta,portrait = vertical
     $year = date("Y");
     $day = date("d");
     $month = date("m");
     $a = array("left" => 0);
     $b = array("justification" => "center");
     $d = array("justification" => "left", "leading" => 8);
     $c = array("left" => 0, "leading" => 12);
     //leading = espaciado
     $e = array("left" => 0, "leading" => 15);
     //leading = espaciado
     $pdf->ezSetCmMargins(4, 3, 4, 2);
     //top,botton,left,right
     /* Se establece la fuente que se utilizara para el texto. */
     $pdf->selectFont("../include/pdf/fonts/Times-Roman.afm");
     $pdf->ezText("ACTA DE RECUPERACION DE RADICADOS \n\n", 15, $b);
     //$pdf->ezText($this->query." :  \n" ,12,$d);
     $txtformat = "Radicados recuperados a {$fecha_doc} y autorizados por {$usuarioAutorizaNomb} \n\n ";
     $pdf->ezText($txtformat, 12, $c);
     $this->conexion->getResult($this->query);
     $data = array();
     $columna = array();
     $contador = 0;
     while ($this->conexion->cursor->next_record() != 0) {
         $radicado = $this->conexion->cursor->f('radi_nume_radi');
         $columna[$contador++] = $radicado;
         if ($contador == 4) {
             $contador = 0;
             $data = array_merge($data, array(array('-1-' => $columna[0], '-2-' => $columna[1], '-3-' => $columna[2], '-4-' => $columna[3])));
             array_splice($columna, 0);
         }
         //$data=  array_merge ($data,array (array('Número'=>$rucConsecutivo."-".$rucYear,'Usuario'=>$nombre,'Defensor Público'=>$nombreDefensor)));
     }
     if ($contador != 0) {
         $data = array_merge($data, array(array('-1-' => $columna[0], '-2-' => $columna[1], '-3-' => $columna[2], '-4-' => $columna[3])));
     }
     $pdf->ezTable($data);
     $pdf->ezStream();
 }
Beispiel #23
0
         $total += showcompany($company, true);
     }
 }
 echo '<h2>' . $AppUI->_('Total Hours') . ': ';
 printf("%.2f", $total);
 echo '</h2>';
 $pdfdata[] = array($AppUI->_('Total Hours'), round($total, 2));
 if ($log_pdf) {
     // make the PDF file
     $font_dir = W2P_BASE_DIR . '/lib/ezpdf/fonts';
     $temp_dir = W2P_BASE_DIR . '/files/temp';
     require $AppUI->getLibraryClass('ezpdf/class.ezpdf');
     $pdf = new Cezpdf();
     $pdf->ezSetCmMargins(1, 2, 1.5, 1.5);
     $pdf->selectFont($font_dir . '/Helvetica.afm');
     $pdf->ezText(w2PgetConfig('company_name'), 12);
     if ($log_all) {
         $date = new w2p_Utilities_Date();
         $pdf->ezText("\nAll hours as of " . $date->format($df), 8);
     } else {
         $sdate = new w2p_Utilities_Date($log_start_date);
         $edate = new w2p_Utilities_Date($log_end_date);
         $pdf->ezText("\nHours from " . $sdate->format($df) . ' to ' . $edate->format($df), 8);
     }
     $pdf->selectFont($font_dir . '/Helvetica-Bold.afm');
     $pdf->ezText("\n" . $AppUI->_('Overall Report'), 12);
     foreach ($allpdfdata as $company => $data) {
         $title = $company;
         $options = array('showLines' => 1, 'showHeadings' => 0, 'fontSize' => 8, 'rowGap' => 2, 'colGap' => 5, 'xPos' => 50, 'xOrientation' => 'right', 'width' => '500', 'cols' => array(0 => array('justification' => 'left', 'width' => 250), 1 => array('justification' => 'right', 'width' => 120)));
         $pdf->ezTable($data, null, $title, $options);
     }
 function _ezText($text, $size = 0, $options = array(), $test = 0)
 {
     return parent::ezText($text, $size, $options, $test);
 }
 /**
   Loop through all document specification settings and print specified text
 
   \return new Y offset
 */
 function outputDocSpecification()
 {
     foreach (array_keys($this->DocSpecification) as $key) {
         $outputElement =& $this->DocSpecification[$key];
         $documentSpec =& $outputElement['docSpec'];
         if (isset($documentSpec['fontName'])) {
             $this->selectFont($documentSpec['fontName']);
         }
         if (isset($documentSpec['fontSize'])) {
             $size = $documentSpec['fontSize'];
         } else {
             $size = $this->fontSize();
         }
         if (isset($documentSpec['cmyk'])) {
             $this->setColor($documentSpec['cmyk']);
         }
         if (isset($outputElement['isFunction']) && $outputElement['isFunction'] === true) {
             $return = call_user_func_array(array(&$this, $outputElement['functionName']), $outputElement['parameters']);
         } else {
             $return = Cezpdf::ezText($outputElement['text'], $size, array('justification' => $documentSpec['justification']));
         }
     }
     return $return;
 }
Beispiel #26
0
        }
        $data = array_merge($data, array(array('NUMERO RADICADO' => $radsGrupo[$i], 'FECHA RADICADO' => $rad->getRadi_fech_radi(), 'DESTINATARIO' => $datosRad["nombre"], 'DIRECCION' => $datosRad["direccion"], 'DEPARTAMENTO' => $datosRad["deptoNombre"], 'MUNICIPIO' => $datosRad["muniNombre"], 'ELIMINADO' => $eliminado)));
        $i++;
    }
} else {
    $data = array_merge($data, array(array('RESULTADO' => "NO SE ESPECIFICÓ EL GRUPO A RECUPERAR")));
}
$retirados = "";
$orientIzq = array("left" => 0);
$justCentro = array("justification" => "center");
$estilo1 = array("justification" => "left", "leading" => 8);
$estilo2 = array("left" => 0, "leading" => 12);
$estilo3 = array("left" => 0, "leading" => 15);
$pdf = new Cezpdf("LETTER", "landscape");
$pdf->selectFont("{$ruta_raiz}/include/pdf/fonts/Times-Roman.afm");
$pdf->ezText("RECUPERACION DE LISTADO \n\n", 15, $justCentro);
$pdf->ezText("Dependencia: {$dependencia} \n", 12, $estilo1);
$pdf->ezText("Usuario Responsable: " . $objUsuario->get_usua_nomb() . " \n", 12, $estilo1);
$pdf->ezText("Fecha: {$fechaRadGrupo} \n", 12, $estilo1);
$pdf->ezText("\n\n\n ", 6, $estilo1);
$pdf->ezTable($data, '', '', array('fontSize' => 6, 'width' => 700));
//Var para almacenar la hora con formato
$hora = date("H") . "_" . date("i") . "_" . date("s");
// var que almacena el dia de la fecha
$ddate = date('d');
// var que almacena el mes de la fecha
$mdate = date('m');
// var que almacena el año de la fecha
$adate = date('Y');
// var que almacena  la fecha formateada
$fecha = $adate . "_" . $mdate . "_" . $ddate;
Beispiel #27
0
 $currencies = new currencies();
 //$pdf->setPreferences(array("HideToolbar" => 'false', "HideWindowUI" => 'false'));
 $pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
 $pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
 // logo image
 list($w, $h) = getimagesize(HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'templates/' . DIR_WS_TEMPLATES_DEFAULT . '/images/' . STORE_LOGO);
 if (stristr(STORE_LOGO, '.png') === FALSE) {
     $pdf->addJpegFromFile(HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'templates/' . DIR_WS_TEMPLATES_DEFAULT . '/images/' . STORE_LOGO, 30, 730, $w, $h);
 } else {
     $pdf->addPngFromFile(HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'templates/' . DIR_WS_TEMPLATES_DEFAULT . '/images/' . STORE_LOGO, 30, 730, $w, $h);
 }
 // invoice number and box
 $pdf->setStrokeColor(0, 0, 0);
 $pdf->setLineStyle(0.5);
 $pdf->Rectangle(390, 793, 175, 20);
 $y = $pdf->ezText("<b>" . str_replace($vilains, $cools, TEXT_ORDER_NUMBER) . " </b>" . $orders['orders_prefix'] . $orders['orders_id'] . "\n\n", SUB_HEADING_FONT_SIZE, array('aleft' => '400'));
 // company name and details pulled from the my store address and phone number
 // in admin configuration mystore
 $y += 10;
 $y = $pdf->ezText(STORE_NAME_ADDRESS, COMPANY_HEADER_FONT_SIZE, array('aleft' => '400'));
 $y -= 10;
 // Add in the order titles
 $totalsy = 230;
 $pdf->ezSetY($totalsy);
 for ($j = 0, $n = sizeof($order->totals); $j < $n; $j++) {
     $totaltext = str_replace($vilains, $cools, $order->totals[$j]['title']);
     $fullstop = stripos($totaltext, ".");
     // Cuts shipping title at first '.' and replaces with :
     if ($fullstop != '0') {
         $totaltext = substr($totaltext, 0, $fullstop);
         $totaltext .= ":";
Beispiel #28
0
 if ($log_pdf) {
     // make the PDF file
     if ($project_id != 0) {
         $sql = "SELECT project_name FROM projects WHERE project_id={$project_id}";
         $pname = db_loadResult($sql);
     } else {
         $pname = "All Projects";
     }
     echo db_error();
     $font_dir = DP_BASE_DIR . '/lib/ezpdf/fonts';
     $temp_dir = (dPgetConfig('overlay_dir') == '' ? DP_BASE_DIR : dPgetConfig('overlay_dir')) . '/files/temp';
     require $AppUI->getLibraryClass('ezpdf/class.ezpdf');
     $pdf = new Cezpdf();
     $pdf->ezSetCmMargins(1, 2, 1.5, 1.5);
     $pdf->selectFont("{$font_dir}/Helvetica.afm");
     $pdf->ezText(safe_utf8_decode(dPgetConfig('company_name')), 12);
     $date = new CDate();
     $pdf->ezText("\n" . $date->format($df), 8);
     $pdf->selectFont("{$font_dir}/Helvetica-Bold.afm");
     $pdf->ezText("\n" . safe_utf8_decode($AppUI->_('Task Log Report')), 12);
     $pdf->ezText(safe_utf8_decode($pname), 15);
     if ($log_all) {
         $pdf->ezText("All task log entries", 9);
     } else {
         $pdf->ezText("Task log entries from " . $start_date->format($df) . ' to ' . $end_date->format($df), 9);
     }
     $pdf->ezText("\n\n");
     $title = 'Task Logs';
     $pdfheaders = array(safe_utf8_decode($AppUI->_('Created by')), safe_utf8_decode($AppUI->_('Summary')), safe_utf8_decode($AppUI->_('Description')), safe_utf8_decode($AppUI->_('Date')), safe_utf8_decode($AppUI->_('Hours')), safe_utf8_decode($AppUI->_('Cost Code')));
     $options = array('showLines' => 0, 'fontSize' => 12, 'rowGap' => 2, 'colGap' => 5, 'xPos' => 50, 'xOrientation' => 'right', 'width' => 500);
     $pdfheaderdata[] = array('', '', '', '', '', '');
Beispiel #29
0
 public function pdfObservations($result)
 {
     global $loggedUser, $dateformat, $instDir, $objObservation, $objObserver, $objInstrument, $objLocation, $objPresentations, $objObject, $objFilter, $objEyepiece, $objLens;
     $result = $this->sortResult($result);
     $pdf = new Cezpdf('a4', 'portrait');
     $pdf->ezStartPageNumbers(300, 30, 10);
     $pdf->selectFont($instDir . 'lib/fonts/Helvetica.afm');
     $pdf->ezText(utf8_decode(html_entity_decode($_GET['pdfTitle'])) . "\n");
     $i = 0;
     while (list($key, $value) = each($result)) {
         if ($i++ > 0) {
             $pdf->ezNewPage();
         }
         $obs = $objObservation->getAllInfoDsObservation($value['observationid']);
         $object = $objObject->getAllInfoDsObject($obs['objectname']);
         if ($loggedUser && $objObserver->getObserverProperty($loggedUser, 'UT')) {
             $date = sscanf($obs["date"], "%4d%2d%2d");
         } else {
             $date = sscanf($obs["localdate"], "%4d%2d%2d");
         }
         if ($obs['seeing'] > -1) {
             $seeing = true;
         } else {
             $seeing = false;
         }
         $formattedDate = date($dateformat, mktime(0, 0, 0, $date[1], $date[2], $date[0]));
         $temp = array("Name" => html_entity_decode(LangPDFMessage1) . " : " . $obs['objectname'], "altname" => html_entity_decode(LangPDFMessage2) . " : " . $object["altname"], "type" => $GLOBALS[$object['type']] . html_entity_decode(LangPDFMessage12) . $GLOBALS[$object['con']], "visibility" => $obs['visibility'] ? html_entity_decode(LangViewObservationField22) . " : " . $GLOBALS['Visibility' . $obs['visibility']] : '', "seeing" => $seeing ? LangViewObservationField6 . " : " . $GLOBALS['Seeing' . $obs['seeing']] : '', "limmag" => $obs['limmag'] ? LangViewObservationField7 . " : " . $obs['limmag'] : '', "filter" => $obs['filterid'] ? LangViewObservationField31 . " : " . $objFilter->getFilterPropertyFromId($obs['filterid'], 'name') : '', "eyepiece" => $obs['eyepieceid'] ? LangViewObservationField30 . " : " . $objEyepiece->getEyepiecePropertyFromId($obs['eyepieceid'], 'name') : '', "lens" => $obs['lensid'] ? LangViewObservationField32 . " : " . $objLens->getLensPropertyFromId($obs['lensid'], 'name') : '', "observer" => html_entity_decode(LangPDFMessage13) . $objObserver->getObserverProperty($obs['observerid'], 'firstname') . " " . $objObserver->getObserverProperty($obs['observerid'], 'name') . html_entity_decode(LangPDFMessage14) . $formattedDate, "instrument" => html_entity_decode(LangPDFMessage11) . " : " . $objInstrument->getInstrumentPropertyFromId($obs['instrumentid'], 'name'), "location" => html_entity_decode(LangPDFMessage10) . " : " . $objLocation->getLocationPropertyFromId($obs['locationid'], 'name'), "description" => $objPresentations->br2nl(html_entity_decode($obs['description'])), "desc" => html_entity_decode(LangPDFMessage15));
         $obs1[] = $temp;
         $nm = $obs['objectname'];
         if ($object["altname"]) {
             $nm = $nm . " (" . $object["altname"] . ")";
         }
         $pdf->ezText($nm, "14");
         $tmp = array(array("type" => $temp["type"]));
         $pdf->ezTable($tmp, array("type" => utf8_decode(html_entity_decode(LangPDFMessage5))), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         $tmp = array(array("location" => $temp["location"], "instrument" => $temp["instrument"]));
         $pdf->ezTable($tmp, array("location" => utf8_decode(html_entity_decode(LangPDFMessage1)), "instrument" => utf8_decode(html_entity_decode(LangPDFMessage2))), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         $tmp = array(array("eyepiece" => $temp["eyepiece"]));
         if ($obs['eyepieceid']) {
             $pdf->ezTable($tmp, array("eyepiece" => "test"), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         }
         $tmp = array(array("filter" => $temp["filter"]));
         if ($obs['filterid']) {
             $pdf->ezTable($tmp, array("filter" => "test"), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         }
         $tmp = array(array("lens" => $temp["lens"]));
         if ($obs['lensid']) {
             $pdf->ezTable($tmp, array("lens" => "test"), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         }
         $tmp = array(array("seeing" => $temp["seeing"]));
         if ($seeing) {
             $pdf->ezTable($tmp, array("seeing" => "test"), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         }
         $tmp = array(array("limmag" => $temp["limmag"]));
         if ($obs['limmag']) {
             $pdf->ezTable($tmp, array("limmag" => "test"), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         }
         $tmp = array(array("visibility" => $temp["visibility"]));
         if ($obs['visibility']) {
             $pdf->ezTable($tmp, array("visibility" => "test"), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         }
         $tmp = array(array("observer" => $temp["observer"]));
         $pdf->ezTable($tmp, array("observer" => utf8_decode(html_entity_decode(LangPDFMessage1))), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         $pdf->ezText(utf8_decode(LangPDFMessage15), "12");
         $pdf->ezText("");
         $tmp = array(array("description" => $temp["description"]));
         $pdf->ezTable($tmp, array("description" => utf8_decode(html_entity_decode(LangPDFMessage1))), "", array("width" => "500", "showHeadings" => "0", "showLines" => "0", "shaded" => "0"));
         if ($objObservation->getDsObservationProperty($value['observationid'], 'hasDrawing')) {
             $pdf->ezText("");
             $pdf->ezImage($instDir . "deepsky/drawings/" . $value['observationid'] . ".jpg", 0, 500, "none", "left");
         }
         $pdf->ezText("");
     }
     $pdf->ezStream();
 }
 function _print_prescription_old($p, &$toFile)
 {
     $pdf = new Cezpdf($GLOBALS['rx_paper_size']);
     $pdf->ezSetMargins($GLOBALS['rx_top_margin'], $GLOBALS['rx_bottom_margin'], $GLOBALS['rx_left_margin'], $GLOBALS['rx_right_margin']);
     $pdf->selectFont('Helvetica');
     if (!empty($this->pconfig['logo'])) {
         $pdf->ezImage($this->pconfig['logo'], "", "", "none", "left");
     }
     $pdf->ezText($p->get_prescription_display(), 10);
     if ($this->pconfig['use_signature']) {
         $pdf->ezImage($this->pconfig['signature'], "", "", "none", "left");
     } else {
         $pdf->ezText("\n\n\n\nSignature:________________________________", 10);
     }
     if (!empty($toFile)) {
         $toFile = $pdf->ezOutput();
     } else {
         $pdf->ezStream();
         // $pdf->ezStream(array('compress' => 0)); // for testing with uncompressed output
     }
     return;
 }