本文整理汇总了PHP中Cezpdf::addJpegFromFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Cezpdf::addJpegFromFile方法的具体用法?PHP Cezpdf::addJpegFromFile怎么用?PHP Cezpdf::addJpegFromFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cezpdf
的用法示例。
在下文中一共展示了Cezpdf::addJpegFromFile方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
function berechnung_anzeigen($leerstand_arr, $vermietete_arr, $monat, $jahr)
{
echo '<pre>';
// print_r($vermietete_arr);
$anzahl_vermietete = count($vermietete_arr);
$mv = new mietvertrag();
$m = new mietkonto();
$haeuser = array();
$gsollmiete_vermietet = 0;
for ($a = 0; $a < $anzahl_vermietete; $a++) {
$einheit_id = $vermietete_arr[$a]['EINHEIT_ID'];
$haus_str = $vermietete_arr[$a]['HAUS_STRASSE'];
$haus_nr = $vermietete_arr[$a]['HAUS_NUMMER'];
$haus_str_nr = $haus_str . ' ' . $haus_nr;
if (!in_array($haus_str_nr, $haeuser)) {
$haeuser[] = $haus_str_nr;
}
$mv->get_mietvertrag_infos_aktuell($einheit_id);
$summe_f_monatlich = $m->summe_forderung_monatlich($mv->mietvertrag_id, $monat, $jahr);
$gsollmiete_vermietet = $gsollmiete_vermietet + $summe_f_monatlich;
}
$anzahl_leer = count($leerstand_arr);
$gsollmiete_leer = 0;
for ($b = 0; $b < $anzahl_leer; $b++) {
$einheit_id = $leerstand_arr[$b]['EINHEIT_ID'];
$haus_str = $leerstand_arr[$b]['HAUS_STRASSE'];
$haus_nr = $leerstand_arr[$b]['HAUS_NUMMER'];
$haus_str_nr = $haus_str . ' ' . $haus_nr;
if (!in_array($haus_str_nr, $haeuser)) {
$haeuser[] = $haus_str_nr;
}
$sollmiete_leer = $this->get_sollmiete_leerstand($einheit_id);
$gsollmiete_leer = $gsollmiete_leer + $sollmiete_leer;
}
// print_r($haeuser);
$g_summe = $gsollmiete_vermietet + $gsollmiete_leer;
$g_summe_a = nummer_punkt2komma($g_summe);
$gsollmiete_vermietet_a = nummer_punkt2komma($gsollmiete_vermietet);
$gsollmiete_leer_a = nummer_punkt2komma($gsollmiete_leer);
$v_geb = $g_summe / 100 * 5;
$brutto_vgeb = $v_geb * 1.19;
$mwst_eur = $v_geb / 100 * 19;
$mwst_eur = nummer_punkt2komma($mwst_eur);
$brutto_vgeb_a = nummer_punkt2komma($brutto_vgeb);
$v_geb_a = nummer_punkt2komma($v_geb);
if (!isset($_REQUEST['pdf'])) {
echo "{$gsollmiete_vermietet_a} € GESAMT SOLL VERMIETET<br>";
echo "{$gsollmiete_leer_a} € GESAMT SOLL LEER<br>";
echo " {$g_summe_a} € GESAMT SOLL<br>";
echo " {$v_geb_a} € NETTO VERWALTERGEBÜHR 5%<br>";
echo " <b>{$brutto_vgeb_a} € INKL. 19% MWST VERWALTERGEBÜHR 5%</b><hr>";
} else {
/* PDF AUSGABE */
ob_clean();
// ausgabepuffer leeren
header("Content-type: application/pdf");
// wird von MSIE ignoriert
//include_once ('pdfclass/class.ezpdf.php');
$pdf = new Cezpdf('a4', 'portrait');
$pdf->ezSetCmMargins(4.5, 1, 1, 1);
$berlus_schrift = 'pdfclass/fonts/Times-Roman.afm';
$text_schrift = 'pdfclass/fonts/Arial.afm';
$pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
// $pdf->addJpgFromFile('pdfclass/logo_262_150_sw1.jpg', 300, 500, 250, 150);
$pdf->setLineStyle(0.5);
$pdf->selectFont($berlus_schrift);
$pdf->addText(42, 743, 6, "BERLUS HAUSVERWALTUNG - Fontanestr. 1 - 14193 Berlin");
$pdf->line(42, 750, 550, 750);
$monatsname = monat2name($monat);
$pdf->addText(42, 720, 12, "Berechnungsbogen für die Verwaltergebühr {$monatsname} {$jahr}");
$pdf->addText(42, 650, 10, "Gesamtsoll aus vermieteten Einheiten");
$pdf->addText(300, 650, 10, "{$gsollmiete_vermietet_a} €");
$pdf->addText(42, 635, 10, "Gesamtsoll aus leerstehenden Einheiten");
$pdf->addText(300, 635, 10, "{$gsollmiete_leer_a} €");
$pdf->setLineStyle(0.5);
$pdf->line(42, 630, 350, 630);
$pdf->addText(42, 620, 10, "<b>Gesamtsoll");
$pdf->addText(300, 620, 10, "{$g_summe_a} €</b>");
$pdf->addText(42, 595, 10, "5% Verwaltergebühr");
$pdf->addText(300, 595, 10, "{$v_geb_a} €");
$pdf->addText(42, 585, 10, "+ 19% MWSt");
$pdf->addText(300, 585, 10, "{$mwst_eur} €");
$pdf->setLineStyle(0.5);
$pdf->line(42, 580, 350, 580);
$pdf->addText(42, 570, 10, "<b>Verwaltergebühr brutto");
$pdf->addText(300, 570, 10, "{$brutto_vgeb_a} €</b>");
/* Häuser */
$pdf->addText(42, 480, 10, "In diese Berechnung wurden folgende Häuser einbezogen:");
$text_xpos = 460;
for ($c = 0; $c < count($haeuser); $c++) {
$haus = $haeuser[$c];
$pdf->addText(42, $text_xpos, 10, "<b>{$haus}</b>");
$text_xpos = $text_xpos - 10;
if ($text_xpos == 100) {
$pdf->ezNewPage();
$text_xpos = 650;
$pdf->ezSetCmMargins(4.5, 1, 1, 1);
$berlus_schrift = 'pdfclass/fonts/Times-Roman.afm';
$text_schrift = 'pdfclass/fonts/Arial.afm';
$pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
//.........这里部分代码省略.........
示例2: pdfLaudos
/**
* gera um pdf dos laudos
*
* @param array $r
*/
function pdfLaudos($rs){
//error_reporting(E_ALL);
set_time_limit(1800);
include 'lib/php/classes/class.ezpdf.php';
$pdf = new Cezpdf('a4','portrait');
$pdf -> ezSetMargins(50,70,50,50);
$all = $pdf->openObject();
$pdf->saveState();
$pdf->setStrokeColor(0,0,0,1);
$pdf->restoreState();
$pdf->closeObject();
$pdf->addObject($all,'all');
$mainFont = './fonts/Courier.afm';
$codeFont = './fonts/Courier.afm';
$pdf->selectFont($mainFont);
$n_rows = sizeof($rs);
$c = 0;
$t=945;
$fator = 25;
foreach($rs as $id => $r){
$o = new Interpretacao($r["int_id"]);
$hos = new Hospital($o->get("hos_id"));
$hos_nome = $hos->get("hos_nome");
$con = new Convenio($o->get("con_id"));
$con_nome = $con->get("con_nome");
$exa = new Exame($o->get("exa_id"));
$exa_nome = $exa->get("exa_nome");
$pdf->ezText($hos_nome,18,array('justification'=>'center'));
$pdf->ezText(" ",20,array('justification'=>'left'));
$pdf->ezText("PACIENTE : ".$r["int_paciente_prontuario"]." ".$r["int_paciente_nome"],10,array('justification'=>'left'));
if ($r["int_paciente_nascimento"] == "0000-00-00")
$pdf->ezText("NASCIMENTO : SEXO: ".$r["int_paciente_sexo"],10,array('justification'=>'left'));
else
$pdf->ezText("NASCIMENTO : ".Formatacao::formatBrData($r["int_paciente_nascimento"])." SEXO: ".$r["int_paciente_sexo"],10,array('justification'=>'left'));
$pdf->ezText("CONVÊNIO : ".$con_nome,10,array('justification'=>'left'));
$pdf->ezText("EXAME : ".$exa_nome,10,array('justification'=>'left'));
$pdf->ezText(" ",20,array('justification'=>'left'));
$pdf->ezText(" DATA: ".Formatacao::formatBrDataHoraminSeg($r["int_data_interpretacao"]),10,array('justification'=>'left'));
$pdf->ezText("N DO EXAME : ".$r["int_opcional"],10,array('justification'=>'left'));
$pdf->ezText("MÉDICO REQUISITANTE : ".$r["int_requisitante"],10,array('justification'=>'left'));
$pdf->ezText("EXAME INTERPRETADO POR : 9679 Ernesto Sousa Nunes",10,array('justification'=>'left'));
$pdf->ezText("TÉCNICO RX : ".$r["int_tecnico_rx"],10,array('justification'=>'left'));
$pdf->ezText(" ",20,array('justification'=>'left'));
$pdf->ezText("I N T E R P R E T A Ç Ã O",18,array('justification'=>'center'));
$pdf->ezText(" ",20,array('justification'=>'left'));
$vet_txt = split("\n",$r["int_texto"]);
$pdf->ezText("============================================================================",10,array('justification'=>'left'));
$pdf->ezText(" ",8,array('justification'=>'left'));
foreach($vet_txt as $linha){
$pdf->ezText(" ".$linha,10,array('justification'=>'left'));
}
$pdf->ezText(" ",8,array('justification'=>'left'));
$pdf->ezText("============================================================================",10,array('justification'=>'left'));
$pdf->ezText(" Exame interpretado por: 9676 - Dr. Ernesto Sousa Nunes",10,array('justification'=>'left'));
$pdf->addJpegFromFile('ass.jpg',250, 0);
$pdf->openHere('Fit');
if ($c+1 < $n_rows)
$pdf->ezNewPage();
$c++;
$o->informaImpressao();
//$sql = "update laudo set LAU_DATA_EXPORTACAO = now() where LAU_ID = ".$r["LAU_ID"]." LIMIT 1";
//$up = mysql_query($sql, $db) or die(mysql_error());
}
$pdfcode = $pdf->Output();
//$pdfcode = str_replace("\n","\n<br>",htmlspecialchars($pdfcode));
//$cont = trim($pdfcode);
$fh = fopen("laudos_prontos.pdf", 'w+');
fwrite($fh, $pdfcode);
fclose($fh);
?><script language="javascript">document.location.href="laudos_prontos.pdf";</script><?
}
示例3: addImage
/**
* add a given image to the document
*
* @param CezShowimageParameter $params image parameter
* @param float $x horizontal position
* @param float $y vertical position
* @param $w width
* @param $h height
* @param $quality image quality
* @access protected
*/
function addImage(&$params, $x = 0, $y = 0, $w = 0, $h = 0, $quality = 75)
{
if ($params->isUrl()) {
if (function_exists('imagecreatefrompng')) {
switch ($params->getImageType()) {
case 3:
// png
$image = imagecreatefrompng($params->getFilename());
break;
case 2:
// jpeg
$image = imagecreatefromjpeg($params->getFilename());
break;
case 1:
// gif
$image = imagecreatefromgif($params->getFilename());
break;
}
parent::addImage($image, $x, $y, $params->getWidth(), $params->getHeight());
}
} else {
// check for image type, currently only png and jpeg supported
switch ($params->getImageType()) {
case 3:
// png
parent::addPngFromFile($params->getFilename(), $x, $y, $params->getWidth(), $params->getHeight());
break;
case 2:
// jpeg
parent::addJpegFromFile($params->getFilename(), $x, $y, $params->getWidth(), $params->getHeight());
break;
case 1:
// gif
parent::addGifFromFile($params->getFilename(), $x, $y, $params->getWidth(), $params->getHeight());
break;
}
}
}
示例4: define
// need to tweak these values to prevent text from clashing together
define('PRODUCTS_COLUMN_SIZE', '165');
define('PRODUCT_LISTING_BKGD_COLOR', GREY);
define('MODEL_COLUMN_SIZE', '37');
define('PRICING_COLUMN_SIZES', '67');
$vilains = array("à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ", "ß", "'", " ", "à", "á", "ã", "ä", "&Arond;", "è", "æ", "ê", "ë", "ì", "í", "Í", "î", "ï", "ò", "ó", "ô", "õ", "ö", "ø", "ù", "ú", "û", "ü", "ñ", "ç", "ý", "<", ">", "&");
$cools = array('à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ', 'ß', '\'', ' ', 'à', 'á', 'ã', 'ä', 'å', 'è', 'æ', 'ê', 'ë', 'ì', 'í', 'î', 'Î', 'ï', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ñ', 'ç', 'ý', '<', '>', '&');
$currencies = new currencies();
$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('../images/' . 'store_logo.jpg', 365, 730, 85, 80);
// extra info boxs to be used by staff
$pdf->setStrokeColor(0, 0, 0);
$pdf->setLineStyle(1);
$pdf->roundedRectangle(470, 730, 85, 85, 10, $f = 0);
$pdf->rectangle(535, 748, 10, 10);
$pdf->rectangle(535, 769, 10, 10);
$pdf->rectangle(535, 790, 10, 10);
$pdf->addText(480, 790, GENERAL_FONT_SIZE, TEXT_BANK);
$pdf->addText(480, 769, GENERAL_FONT_SIZE, TEXT_POST);
$pdf->addText(480, 748, GENERAL_FONT_SIZE, TEXT_SALES);
// line between header order number and order date
$pdf->setLineStyle(1);
$pdf->line(LEFT_MARGIN, $y, LINE_LENGTH, $y);
$pdf->ezSetY($y);
$dup_y = $y;
示例5: Cezpdf
function pdf_header($partner_id)
{
$pdf = new Cezpdf('a4', 'portrait');
$pdf->ezSetCmMargins(4.5, 1, 1, 1);
$berlus_schrift = 'pdfclass/fonts/Times-Roman.afm';
$text_schrift = 'pdfclass/fonts/Arial.afm';
$pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
// $pdf->addJpgFromFile('pdfclass/logo_262_150_sw1.jpg', 300, 500, 250, 150);
$pdf->setLineStyle(0.5);
$pdf->selectFont($berlus_schrift);
$pdf->addText(42, 743, 6, "BERLUS HAUSVERWALTUNG - Fontanestr. 1 - 14193 Berlin");
$pdf->line(42, 750, 550, 750);
$pdf->selectFont($berlus_schrift);
$pdf->ezSetCmMargins(1, 1, 1, 1);
$pdf->setLineStyle(0.5);
$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");
return $pdf;
}
示例6: Cezpdf
<?php
header('Content-Type: application/json');
error_reporting(0);
require_once 'conexion.php';
require_once '../ezpdf/Cezpdf.php';
conectarse();
$pdf = new Cezpdf('a4');
$tmp = array('b' => 'Helvetica-Bold', 'i' => 'Courier-Oblique', 'bi' => 'Helvetica-BoldOblique', 'ib' => 'Helvetica-BoldOblique', 'bb' => 'Times-Roman');
$pdf->setFontFamily('Helvetica', $tmp);
$pdf->selectFont('fonts/Helvetica.afm');
$pdf->ezSetCmMargins(1.5, 1, 2, 3);
$pdf->addJpegFromFile("../img/libro.jpg", 50, 750, 60);
$result = mysql_query("select matricula,\n\tconcat(nombre,' ',apellido_paterno,' ',apellido_materno) as nombre,\n\tconcat(calle,' ',numero,' ',colonia,'') as direccion,ciudad,estado,telefono,celular,sueldo,tipo\n\t\t\t\t\t\tfrom empleados \n\t\t\t\t\t\twhere status = 'ACTIVO' ");
while ($datatmp = mysql_fetch_array($result)) {
$data[] = array_merge($datatmp, array('matricula'));
}
$options = array('shadeHeadingCol' => array(0.6, 0.6, 0.5), 'shadeCol' => array(0.9, 0.9, 0.9), 'xOrientation' => 'center', 'width' => 550, 'fontSize' => 8, 'xPos' => 'center');
$titles = array('matricula' => '<b>ID</b>', 'nombre' => '<b>NOMBRE</b>', 'direccion' => '<b>DIRECCIÓN</b>', 'ciudad' => '<b>CIUDAD</b>', 'estado' => '<b>ESTADO</b>', 'telefono' => '<b>TELÉFONO</b>', 'celular' => '<b>CELULAR</b>', 'sueldo' => '<b>SUELDO</b>', 'tipo' => '<b>TIPO</b>');
$pdf->ezText("\n\n\n\n\n", 10);
$pdf->ezTable($data, $titles, '', $options);
//cabecera del pdf (objeto para todas las páginas)
$all = $pdf->openObject();
$pdf->saveState();
$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(230, 770, 12, "<i>!Leer Aumenta el Saber! </i>\n");
$pdf->addText(240, 740, 12, "<b>Listado Empleados </b>\n");
$pdf->ezText("\n\n\n", 10);
$pdf->addText(50, 30, 8, "<b>Fecha: </b>\n" . date("d/m/Y"));
示例7: Cezpdf
error_reporting(0);
include 'class.ezpdf.php';
include "rupiah.php";
include "../../Inc/koneksi.php";
include "../../Inc/fungsi_indotgl.php";
include "../../Inc/library.php";
$pdf = new Cezpdf();
// Set margin dan font
$pdf->ezSetCmMargins(3, 3, 3, 3);
$pdf->selectFont('fonts/Courier.afm');
$all = $pdf->openObject();
$pemilik = mysql_fetch_array(mysql_query("select nm_perusahaan,alamat from bigbook_perusahaan")) or die("gagal");
// Tampilkan logo
$pdf->setStrokeColor(0, 0, 0, 1);
$pdf->addJpegFromFile('logo.jpg', 20, 785, 69);
// Teks di tengah atas untuk judul header
$pdf->addText(150, 820, 16, '<b>Laporan Penjualan Bulan' . tgl_indo(date("Ymd")) . '</b>');
$pdf->addText(200, 800, 14, '<b>' . $pemilik[nm_perusahaan] . '</b>');
// Garis atas untuk header
$pdf->line(10, 795, 578, 795);
// Garis bawah untuk footer
$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');
// Baca input tanggal yang dikirimkan user
$mulai = $_GET[tgl1];
$selesai = $_GET[tgl2];
示例8: Cezpdf
session_start();
if (empty($_SESSION['username']) and empty($_SESSION['passuser'])) {
echo "<link href='style.css' rel='stylesheet' type='text/css'>\n <center>Untuk mengakses modul, Anda harus login <br>";
echo "<a href=../../index.php><b>LOGIN</b></a></center>";
} else {
include "class.ezpdf.php";
include "../../../config/koneksi.php";
include "rupiah.php";
$pdf = new Cezpdf();
// Set margin dan font
$pdf->ezSetCmMargins(3, 3, 3, 3);
$pdf->selectFont('fonts/Courier.afm');
$all = $pdf->openObject();
// Tampilkan logo
$pdf->setStrokeColor(0, 0, 0, 1);
$pdf->addJpegFromFile('logo.jpg', 20, 800, 69);
// Teks di tengah atas untuk judul header
$pdf->addText(220, 820, 16, '<b>Laporan Penjualan</b>');
$pdf->addText(200, 800, 18, '<b>Toko Komputer Wincom</b>');
// Garis atas untuk header
$pdf->line(10, 795, 578, 795);
// Garis bawah untuk footer
$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');
// 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];
示例9: foreach
if ($order->delivery != $order->billing) {
// right rounded rectangle around ship to info
$pdf->setStrokeColor(0, 0, 0);
$pdf->setLineStyle(1);
$pdf->roundedRectangle(228, 400, 190, 100, 10, $f = 0);
// ship to info in middle column
$pdf->addText(MIDDLE_COLUMN_START, $y, SUB_HEADING_FONT_SIZE, "<b>" . ENTRY_SHIP_TO . "</b>");
$pos = $y;
$indent = MIDDLE_COLUMN_START + TEXT_BLOCK_INDENT;
// $address_array=explode('<br>',tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'));
foreach ($delivery_address_array as $key => $value) {
$pdf->addText($indent, $pos -= IPS_LEADING, IPS_FONT_SIZE, $value);
}
}
// logo image set to right below store name/address.. change first number to move sideways
$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'integrated_logo.jpg', 450, 400, 55, 40);
$pos = $y;
$address_array = explode('<br>', str_replace("\r\n", "<br>", STORE_NAME_ADDRESS));
foreach ($address_array as $key => $value) {
// echo $value.'<br>' ;
$pdf->addText(RIGHT_COLUMN_START, $pos -= IPS_LEADING, IPS_FONT_SIZE, $value);
}
$pdf->addText(RIGHT_COLUMN_START, $pos -= IPS_LEADING, IPS_FONT_SIZE, WEBSITE);
// phone and email statments .. added blank lines if turned off so as to maintain layout
//if ($_POST['show_phone'] || $_POST['show_email'] ) {
$pos -= SECTION_DIVIDER;
$pdf->ezSetY($pos - 20);
//if ($_POST['show_phone']) {
$pos = $pdf->ezText("<b>" . ENTRY_PHONE . "</b> " . $order->customer['telephone'], IPS_FONT_SIZE);
//} if ($_POST['show_email']) {
$pos = $pdf->ezText("<b>" . ENTRY_EMAIL . "</b> " . $order->customer['email_address'], IPS_FONT_SIZE);
示例10: Cezpdf
function hv_pdf_kopf()
{
//include_once ('pdfclass/class.ezpdf.php');
$pdf = new Cezpdf('a4', 'portrait');
$pdf->ezSetCmMargins(4.5, 1, 1, 1);
$berlus_schrift = 'pdfclass/fonts/Times-Roman.afm';
$text_schrift = 'pdfclass/fonts/Arial.afm';
$pdf->addJpegFromFile('includes/logos/logo_hv_sw.jpg', 220, 750, 175, 100);
// $pdf->addJpgFromFile('pdfclass/logo_262_150_sw1.jpg', 300, 500, 250, 150);
$pdf->setLineStyle(0.5);
$pdf->selectFont($berlus_schrift);
$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);
}
示例11: creaPDF
//.........这里部分代码省略.........
$regimenFiscal = $xmlArray[$comprobante][$emisor]["cfdi:RegimenFiscal_attr"]["Regimen"];
// ---------------------------------------------------------------------------------------------------------------
//descuentos
$desc1 = 0.0;
$desc2 = 0.0;
//==================================================================================================================
$pdf->ezSetMargins(100, 30, 30, 30);
$pdf->selectFont($FWK_PDFDEFAULTFONT);
$pdf->setLineStyle(0.7, '', '', '', 0);
$pdf->openHere('Fit');
if ($row_factura['tipocfd'] == 3) {
$pdf->setStrokeColor(255, 0, 0);
}
if ($row_factura['tipocfd'] == 2) {
$pdf->setStrokeColor(0, 255, 0);
}
// Inicia numeracin de paginas.
$pagina = 1;
$pdf->ezStartPageNumbers(500, 15, 10, '', '{PAGENUM} de {TOTALPAGENUM}', 1);
$primeraPagina = $pdf->currentPage;
// i. Agrega el logo de la empresa
$pathToLogo = $path == "../" ? "../f4/extensiones/" : "";
$logofile = "logos/f.jpg";
//TENDRA QUE VENIR DE UN PARAMETRO EN LA BD.
/*if(isset($row_empresa['rfc']) && !empty($row_empresa['rfc']))
$logofile="logos/".$row_empresa['rfc'].".jpg";*/
if (isset($sucursal["respuesta"]["sucursal"]) && !empty($sucursal["respuesta"]["sucursal"])) {
$logofile = "logos/" . strtolower($sucursal["respuesta"]["sucursal"]) . ".jpg";
}
error_log($logofile);
if ($comprobanteNode['serie'] == "X") {
$logofile = "logos/wingu-xpress.jpg";
}
$pdf->addJpegFromFile($pathToLogo . $logofile, 30, 705, 140);
// i. Agrega la leyenda "cancelada"
if ($row_factura['estatus'] == 0) {
$pdf->setColor(0.9, 0.9, 0.9);
$pdf->addText(180, 200, 65, "<b>CANCELADA</b>", -45);
$pdf->setColor(0, 0, 0);
}
// ------------------------------------------ENCABEZADO ------------------------------------------
//ENCABEZADO DE LA FACTURA
$tipoDocto = $row_factura['tipodocumento'];
$tipoDocto1 = $row_factura['tipodocumento'] == "FACTURA" ? "FACTURA" : "";
$tipoDocto2 = $row_factura['tipodocumento'] == "NOTA CARGO" ? "FACTURA" : "";
$tipoDocto3 = $row_factura['tipodocumento'] == "NOTA CREDITO" ? "NOTA DE CREDITO" : "";
$emisor = utf8_decode($emisorNode['nombre'] . "\n" . $emisorNode['rfc']) . "\n";
$noInterior = isset($emisordomicilioNode['noInterior']) ? $emisordomicilioNode['noInterior'] : "";
$noExterior = isset($emisordomicilioNode['noExterior']) ? $emisordomicilioNode['noExterior'] : "";
$emisor .= utf8_decode($emisordomicilioNode['calle'] . " {$noExterior}");
$emisor .= utf8_decode($emisordomicilioNode['colonia']);
if (isset($emisordomicilioNode['localidad'])) {
$emisor .= "\n" . utf8_decode($emisordomicilioNode['localidad']);
}
if ($emisordomicilioNode['municipio'] != "" && isset($emisordomicilioNode['municipio'])) {
$emisor .= "\n" . utf8_decode($emisordomicilioNode['municipio']);
}
if ($emisordomicilioNode['estado'] != "" && isset($emisordomicilioNode['estado'])) {
$emisor .= ", " . utf8_decode($emisordomicilioNode['estado']);
}
if ($emisordomicilioNode['codigoPostal'] != "" && isset($emisordomicilioNode['codigoPostal'])) {
$emisor .= "\nCP " . utf8_decode($emisordomicilioNode['codigoPostal']);
}
$emisor .= " " . utf8_decode($emisordomicilioNode['pais']);
$telefono = isset($row_empresa['telefono']) ? $row_empresa['telefono'] : "";
$emisor .= "\nTel: " . $telefono . "\n";
示例12: define
// the cell padding effect
define('PRODUCT_TABLE_LEFT_MARGIN', '2');
// Height of the product listing rectangles
define('PRODUCT_TABLE_ROW_HEIGHT', '11');
// 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', '165');
define('PRODUCT_LISTING_BKGD_COLOR', GREY);
define('MODEL_COLUMN_SIZE', '37');
define('PRICING_COLUMN_SIZES', '67');
$currencies = new currencies();
$pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
$pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
//watermark
$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'watermark.jpg', 30, 110, 550, 550);
// company name and details pulled from the my store address and phone number
// in admin configuration mystore
//$pdf->addJpegFromFile('./invoicelogo.jpg',23,150,567,567);
//$pdf->addText(132,489,70,"YOUR WATERMARK",-45);
$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', 480, 730, 85, 85);
// line between header and rest of page
$pdf->setLineStyle(1);
$pdf->line(LEFT_MARGIN, $y, LINE_LENGTH, $y);
$pdf->ezSetY($y);
$dup_y = $y;
$pos -= SECTION_DIVIDER;
}
示例13: Cezpdf
<?php
/*
$Id$
osCmax e-Commerce
http://www.oscmax.com
Copyright 2000 - 2011 osCmax
Released under the GNU General Public License
*/
// set paper type and size
if ($pageloop == "0") {
$pdf = new Cezpdf(A4, portrait);
} else {
$currencies = new currencies();
$pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
$pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
// logo image set to right of the above .. change first number to move sideways
$pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'christmascard.jpg', 0, 0, 590, 820);
$pdf->addText(330, 330, GENERAL_FONT_SIZE, TEXT_DEAR);
$pdf->addText(350, 310, GENERAL_FONT_SIZE, $order->billing['name']);
$pdf->addText(350, 290, GENERAL_FONT_SIZE, TEXT_THX_CHRISMAS);
//require(BATCH_PRINT_INC . 'templates/' . 'grid.php');
}
示例14: imprimirEstadoCuentaCliente
/**
* Crea un pdf con el estado de cuenta de el cliente especificado
* @param Array $args, $args['id_cliente'=>12[,'tipo_venta'=> 'credito | contado | saldo'] ], por default obtiene todas las compras del cliente
*/
public static function imprimirEstadoCuentaCliente($args)
{
//verificamos que se haya especificado el id del cliente
if (!isset($args['id_cliente'])) {
Logger::log("Error al obtener el estado de cuenta, no se ha especificado un cliente.");
die('{"success": false, "reason": "Error al obtener el estado de cuenta, no se ha especificado un cliente."}');
}
//verificamos que el cliente exista
if (!($cliente = ClienteDAO::getByPK($args['id_cliente']))) {
Logger::log("Error al obtener el estado de cuenta, no se tiene registro del cliente {$args['id_cliente']}.");
die('{"success": false, "reason": "Error al obtener el estado de cuenta, no se tiene registro del cliente ' . $args['id_cliente'] . '"}');
}
//obtenemos los datos del emisor
$estado_cuenta = estadoCuentaCliente($args);
//buscar los datos del emisor
if (!($emisor = PosConfigDAO::getByPK('emisor'))) {
Logger::log("no encuentro los datos del emisor");
die("no encuentro los datos del emisor");
}
$emisor = json_decode($emisor->getValue())->emisor;
$sucursal = SucursalDAO::getByPK($_SESSION['sucursal']);
if (!$sucursal) {
die("Sucursal invalida");
}
include_once 'librerias/ezpdf/class.pdf.php';
include_once 'librerias/ezpdf/class.ezpdf.php';
$pdf = new Cezpdf();
$pdf->selectFont('../server/librerias/ezpdf/fonts/Helvetica.afm');
//margenes de un centimetro para toda la pagina
$pdf->ezSetMargins(1, 1, 1, 1);
/*
* LOGO
*/
if (!($logo = PosConfigDAO::getByPK('url_logo'))) {
Logger::log("Verifique la configuracion del pos_config, no se encontro el camṕo 'url_logo'");
die("Verifique la configuracion del POS, no se encontro el url del logo");
}
//addJpegFromFile(imgFileName,x,y,w,[h])
//detectamos el tipo de imagen del logo
if (substr($logo->getValue(), -3) == "jpg" || substr($logo->getValue(), -3) == "JPG" || substr($logo->getValue(), -4) == "jpeg" || substr($logo->getValue(), -4) == "JPEG") {
$pdf->addJpegFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5));
} elseif (substr($logo->getValue(), -3) == "png" || substr($logo->getValue(), -3) == "PNG") {
$pdf->addPngFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5));
} else {
Logger::log("Verifique la configuracion del pos_config, la extension de la imagen del logo no es compatible");
die("La extension de la imagen usada para el logo del negocio no es valida.");
}
/* * ************************
* ENCABEZADO
* ************************* */
$e = "<b>" . self::readableText($emisor->nombre) . "</b>\n";
$e .= formatAddress($emisor);
$e .= "RFC: " . $emisor->rfc . "\n\n";
//datos de la sucursal
$e .= "<b>Lugar de expedicion</b>\n";
$e .= self::readableText($sucursal->getDescripcion()) . "\n";
$e .= formatAddress($sucursal);
$datos = array(array("emisor" => $e));
$pdf->ezSetY(puntos_cm(28.6));
$opciones_tabla = array();
$opciones_tabla['showLines'] = 0;
$opciones_tabla['showHeadings'] = 0;
$opciones_tabla['shaded'] = 0;
$opciones_tabla['fontSize'] = 8;
$opciones_tabla['xOrientation'] = 'right';
$opciones_tabla['xPos'] = puntos_cm(7.3);
$opciones_tabla['width'] = puntos_cm(11);
$opciones_tabla['textCol'] = array(0, 0, 0);
$opciones_tabla['titleFontSize'] = 12;
$opciones_tabla['rowGap'] = 3;
$opciones_tabla['colGap'] = 3;
$pdf->ezTable($datos, "", "", $opciones_tabla);
$cajero = UsuarioDAO::getByPK($_SESSION['userid'])->getNombre();
$datos = array(array("col" => "<b>Cajero</b>"), array("col" => self::readableText($cajero)), array("col" => "<b>Cliente</b>"), array("col" => self::readableText($cliente->getRazonSocial())), array("col" => "<b>Limite de Credito</b>"), array("col" => FormatMoney($estado_cuenta->limite_credito, DONT_USE_HTML)), array("col" => "<b>Saldo</b>"), array("col" => FormatMoney($estado_cuenta->saldo, DONT_USE_HTML)));
$pdf->ezSetY(puntos_cm(28.8));
$opciones_tabla['xPos'] = puntos_cm(12.2);
$opciones_tabla['width'] = puntos_cm(6);
$opciones_tabla['showLines'] = 0;
$opciones_tabla['shaded'] = 2;
$opciones_tabla['shadeCol'] = array(1, 1, 1);
//$opciones_tabla['shadeCol2'] = array(0.054901961, 0.756862745, 0.196078431);
$opciones_tabla['shadeCol2'] = array(0.8984375, 0.95703125, 0.99609375);
$pdf->ezTable($datos, "", "", $opciones_tabla);
//roundRect($pdf, puntos_cm(12.2), puntos_cm(28.8), puntos_cm(6), puntos_cm(4.25));
/**
* ESTADO DE CUENTA
*/
$elementos = array(array('id_venta' => 'Venta', 'fecha' => 'Fecha', 'sucursal' => 'Sucursal', 'cajero' => 'Cajero', 'tipo_venta' => 'Tipo', 'tipo_pago' => 'Pago', 'total' => 'Total', 'pagado' => 'Pagado', 'saldo' => 'Saldo'));
foreach ($estado_cuenta->array_ventas as $venta) {
$array_venta = array();
$array_venta['id_venta'] = $venta['id_venta'];
$array_venta['fecha'] = $venta['fecha'];
$array_venta['sucursal'] = self::readableText($venta['sucursal']);
$array_venta['cajero'] = self::readableText($venta['cajero']);
$array_venta['cancelada'] = self::readableText($venta['cancelada']);
$array_venta['tipo_venta'] = self::readableText($venta['tipo_venta']);
//.........这里部分代码省略.........
示例15: date
$mieter_ids = $buchung->get_personen_ids_mietvertrag($mietvertrag_id);
// $buchung->array_anzeigen($mieter_ids);
// ####Personendaten zu Person_id holen#######
for ($i = 0; $i < count($mieter_ids); $i++) {
$mieter_daten_arr[] = $buchung->get_person_infos($mieter_ids[$i]['PERSON_MIETVERTRAG_PERSON_ID']);
}
// ##überschrift##############################
$heute = date("Y-m-d");
$heute_deutsch = $buchung->date_mysql2german($heute);
// ##erste seite
$pdf = new Cezpdf('a4', 'portrait');
$pdf->ezSetCmMargins(4.3, 0, 1.5, 2.5);
$berlus_schrift = 'Times-Roman.afm';
$text_schrift = 'Helvetica.afm';
// links,
$pdf->addJpegFromFile('includes/logos/Slogo_78_31.jpg', 190, 730, 200, 80);
$pdf->setLineStyle(0.5);
// line(x1,y1,x2,y2) /links anfang hoehe weite hoehe
$pdf->line(42, 722, 550, 722);
$pdf->selectFont($berlus_schrift);
$pdf->ezText("BERLUS HAUSVERWALTUNG * Fontanestr. 1 * 14193 Berlin", 7);
$pdf->ezSetDy(-20);
$pdf->selectFont($berlus_schrift);
$pdf->addText(400, 680, 10, 'Telefon (030) 89784477');
$pdf->addText(400, 665, 10, 'Telefax (030) 89784479');
$pdf->addText(400, 650, 10, 'Email: info@berlus.de');
$pdf->addText(400, 635, 10, '<c:uline><b>Sprechzeiten</b></c:uline>');
$pdf->addText(400, 620, 10, 'Dienstag:');
$pdf->addText(455, 620, 10, '9:00-12:00');
$pdf->addText(400, 605, 10, 'Donnerstag:');
$pdf->addText(450, 605, 10, '14:00-17:00');