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


PHP pdf::SetFont方法代码示例

本文整理汇总了PHP中pdf::SetFont方法的典型用法代码示例。如果您正苦于以下问题:PHP pdf::SetFont方法的具体用法?PHP pdf::SetFont怎么用?PHP pdf::SetFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pdf的用法示例。


在下文中一共展示了pdf::SetFont方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pdf

					$j=$i;
					$l=0;
					$nl++;
				}
				else
					$i++;
			}
			return $nl;
		}
	}
	
	$pdf = new pdf('L','mm','A4');
	$pdf->AliasNbPages();
	$titulos = array('FECHA','F. RECEPCION','SUCURSAL','GUIA','ORIGEN','DESTINO','INCIDENTE','RECIBIO','UNIDAD','RUTA');
	$medidas = array(15,20,15,22,12,12,30,80,20,55);
	$pdf->AddPage();
	
	$pdf->SetFont('Arial','B',7);
	//Table with 20 rows and 4 columns
	
	$pdf->SetWidths($medidas);
	
	$pdf->Titulos($titulos,$medidas);
	
	$pdf->SetFont('Arial','',7);
	for($i=0;$i<count($data);$i++){
		$pdf->Row($data[$i]);
	}
	
	$pdf->Output();
?>
开发者ID:sigmadesarrollo,项目名称:logisoft,代码行数:31,代码来源:danosFaltantes.php

示例2: actionView

 /**
  * printanswers::view()
  * View answers at the end of a survey in one place. To export as pdf, set 'usepdfexport' = 1 in lsconfig.php and $printableexport='pdf'.
  * @param mixed $surveyid
  * @param bool $printableexport
  * @return
  */
 function actionView($surveyid, $printableexport = FALSE)
 {
     Yii::app()->loadHelper("frontend");
     Yii::import('application.libraries.admin.pdf');
     $iSurveyID = (int) $surveyid;
     $sExportType = $printableexport;
     Yii::app()->loadHelper('database');
     if (isset($_SESSION['survey_' . $iSurveyID]['sid'])) {
         $iSurveyID = $_SESSION['survey_' . $iSurveyID]['sid'];
     } else {
         //die('Invalid survey/session');
     }
     // Get the survey inforamtion
     // Set the language for dispay
     if (isset($_SESSION['survey_' . $iSurveyID]['s_lang'])) {
         $sLanguage = $_SESSION['survey_' . $iSurveyID]['s_lang'];
     } elseif (Survey::model()->findByPk($iSurveyID)) {
         $sLanguage = Survey::model()->findByPk($iSurveyID)->language;
     } else {
         $iSurveyID = 0;
         $sLanguage = Yii::app()->getConfig("defaultlang");
     }
     $clang = SetSurveyLanguage($iSurveyID, $sLanguage);
     $aSurveyInfo = getSurveyInfo($iSurveyID, $sLanguage);
     //SET THE TEMPLATE DIRECTORY
     if (!isset($aSurveyInfo['templatedir']) || !$aSurveyInfo['templatedir']) {
         $aSurveyInfo['templatedir'] = Yii::app()->getConfig('defaulttemplate');
     }
     $sTemplate = validateTemplateDir($aSurveyInfo['templatedir']);
     //Survey is not finished or don't exist
     if (!isset($_SESSION['survey_' . $iSurveyID]['finished']) || !isset($_SESSION['survey_' . $iSurveyID]['srid'])) {
         sendCacheHeaders();
         doHeader();
         echo templatereplace(file_get_contents(getTemplatePath($sTemplate) . '/startpage.pstpl'), array());
         echo "<center><br />\n" . "\t<font color='RED'><strong>" . $clang->gT("Error") . "</strong></font><br />\n" . "\t" . $clang->gT("We are sorry but your session has expired.") . "<br />" . $clang->gT("Either you have been inactive for too long, you have cookies disabled for your browser, or there were problems with your connection.") . "<br />\n" . "\t" . sprintf($clang->gT("Please contact %s ( %s ) for further assistance."), Yii::app()->getConfig("siteadminname"), Yii::app()->getConfig("siteadminemail")) . "\n" . "</center><br />\n";
         echo templatereplace(file_get_contents(getTemplatePath($sTemplate) . '/endpage.pstpl'), array());
         doFooter();
         exit;
     }
     //Fin session time out
     $sSRID = $_SESSION['survey_' . $iSurveyID]['srid'];
     //I want to see the answers with this id
     //Ensure script is not run directly, avoid path disclosure
     //if (!isset($rootdir) || isset($_REQUEST['$rootdir'])) {die( "browse - Cannot run this script directly");}
     if ($aSurveyInfo['printanswers'] == 'N') {
         die;
         //Die quietly if print answers is not permitted
     }
     //CHECK IF SURVEY IS ACTIVATED AND EXISTS
     $sSurveyName = $aSurveyInfo['surveyls_title'];
     $sAnonymized = $aSurveyInfo['anonymized'];
     //OK. IF WE GOT THIS FAR, THEN THE SURVEY EXISTS AND IT IS ACTIVE, SO LETS GET TO WORK.
     //SHOW HEADER
     $sOutput = CHtml::form(array("printanswers/view/surveyid/{$iSurveyID}/printableexport/pdf"), 'post') . "<center><input type='submit' value='" . $clang->gT("PDF export") . "'id=\"exportbutton\"/><input type='hidden' name='printableexport' /></center></form>";
     if ($sExportType == 'pdf') {
         //require (Yii::app()->getConfig('rootdir').'/application/config/tcpdf.php');
         Yii::import('application.libraries.admin.pdf', true);
         Yii::import('application.helpers.pdfHelper');
         $aPdfLanguageSettings = pdfHelper::getPdfLanguageSettings($clang->langcode);
         $oPDF = new pdf();
         $oPDF->SetTitle($clang->gT("Survey name (ID)", 'unescaped') . ": {$sSurveyName} ({$iSurveyID})");
         $oPDF->SetSubject($sSurveyName);
         $oPDF->SetDisplayMode('fullpage', 'two');
         $oPDF->setLanguageArray($aPdfLanguageSettings['lg']);
         $oPDF->setHeaderFont(array($aPdfLanguageSettings['pdffont'], '', PDF_FONT_SIZE_MAIN));
         $oPDF->setFooterFont(array($aPdfLanguageSettings['pdffont'], '', PDF_FONT_SIZE_DATA));
         $oPDF->SetFont($aPdfLanguageSettings['pdffont'], '', $aPdfLanguageSettings['pdffontsize']);
         $oPDF->AddPage();
         $oPDF->titleintopdf($clang->gT("Survey name (ID)", 'unescaped') . ": {$sSurveyName} ({$iSurveyID})");
     }
     $sOutput .= "\t<div class='printouttitle'><strong>" . $clang->gT("Survey name (ID):") . "</strong> {$sSurveyName} ({$iSurveyID})</div><p>&nbsp;\n";
     LimeExpressionManager::StartProcessingPage(true);
     // means that all variables are on the same page
     // Since all data are loaded, and don't need JavaScript, pretend all from Group 1
     LimeExpressionManager::StartProcessingGroup(1, $aSurveyInfo['anonymized'] != "N", $iSurveyID);
     $printanswershonorsconditions = Yii::app()->getConfig('printanswershonorsconditions');
     $aFullResponseTable = getFullResponseTable($iSurveyID, $sSRID, $sLanguage, $printanswershonorsconditions);
     //Get the fieldmap @TODO: do we need to filter out some fields?
     if ($aSurveyInfo['datestamp'] != "Y" || $sAnonymized == 'Y') {
         unset($aFullResponseTable['submitdate']);
     } else {
         unset($aFullResponseTable['id']);
     }
     unset($aFullResponseTable['token']);
     unset($aFullResponseTable['lastpage']);
     unset($aFullResponseTable['startlanguage']);
     unset($aFullResponseTable['datestamp']);
     unset($aFullResponseTable['startdate']);
     $sOutput .= "<table class='printouttable' >\n";
     foreach ($aFullResponseTable as $sFieldname => $fname) {
         if (substr($sFieldname, 0, 4) == 'gid_') {
             $sOutput .= "\t<tr class='printanswersgroup'><td colspan='2'>{$fname[0]}</td></tr>\n";
         } elseif (substr($sFieldname, 0, 4) == 'qid_') {
//.........这里部分代码省略.........
开发者ID:josetorerobueno,项目名称:test_repo,代码行数:101,代码来源:PrintanswersController.php

示例3: UCASE

	date_format(current_date, '%d/%m/%Y') as fechaactual,
	cs.estado eest, cs.municipio emun, gc.legal,
	CONCAT(day(gc.fecha),' de ', UCASE(MONTHNAME(gc.fecha)), ' de ',YEAR(gc.fecha)) fechaconvenio,
	CONCAT(day(gc.vigencia),' de ', UCASE(MONTHNAME(gc.vigencia)), ' de ',YEAR(gc.vigencia)) fechavigencia
	FROM generacionconvenio gc
	LEFT JOIN catalogosucursal cs ON gc.sucursal = cs.id
	WHERE gc.folio = '$_GET[folio]'";
	$r = mysql_query($s,$l) or die("error ".mysql_error($l)."--".$s);
	$f = mysql_fetch_object($r);
	//die($s);
	
	$pdf = new pdf();
	$pdf->AliasNbPages();
	$pdf -> AddPage();
	$pdf -> Ln(10);
	$pdf -> SetFont("Arial","",8);
	
	
	$contenido = 'Contrato de prestación de servicios que celebra por una parte ENTREGAS PUNTUALES S DE RL DE CV, a quien en lo sucesivo se le denominará "La Prestadora de Servicios", y por otra parte '.$f->ncliente.' representada por '.ucwords($f->legal).' a quien en lo sucesivo se le denominará "El Cliente".
	
	1.- La Prestadora de Servicios otorgará a "El Cliente" los siguientes servicios:
	                Guias Ventanilla                    Guias Electronicas
	                Entrega a Domicilio                 Recolección a Domicilio
	                Valor Declarado                     Acuse de Recibo
	                Entregas a Subdestinos
					
	2.- El precio del servicio de Recolección a Domicilio (RAD) y Entrega a Domicilio (EAD) es un 10% sobre el valor del flete o bien un cobro mínimo dependiendo de la Ciudad donde se origine el servicio de RAD o donde se envíe el servicio de EAD (ver tarifas).
		
	3.- El precio Valor Declarado es de $8.00 (Son Ocho Pesos 00/100 M.N.)  por millar, este seguro únicamente ampara riegos ordinarios de tránsito (incendio, accidente, asalto a mano armada). De ocurrir cualquiera de los eventos anteriores se cobrará un 20% de deducible sobre el valor declarado, de acuerdo con la póliza de seguros vigente. El máximo del Valor Declarado por guía o carta de porte es de $150,000.00 (Son Ciento cincuenta mil pesos 00/100 M.N).
	
	4.- El Acuse de Recibo tiene un costo de $ 15.00 (Son Quince pesos 00/100) por guía, el Cliente acepta que la falta de entrega de acuse no será una condicionante para la realización de pago de los envíos que realice con La Prestadora de Servicios.
开发者ID:sigmadesarrollo,项目名称:logisoft,代码行数:31,代码来源:convenio_nuevo.php

示例4: generate_statistics


//.........这里部分代码省略.........
         }
         //print_r($_POST);
         //if $summary isn't an array we create one
         if (isset($summary) && !is_array($summary)) {
             $summary = explode("+", $summary);
         }
     }
     /**
      * pdf Config
      */
     if ($outputType == 'pdf') {
         //require_once('classes/tcpdf/mypdf.php');
         Yii::import('application.libraries.admin.pdf', true);
         Yii::import('application.helpers.pdfHelper');
         $aPdfLanguageSettings = pdfHelper::getPdfLanguageSettings($language);
         // create new PDF document
         $this->pdf = new pdf();
         $surveyInfo = getSurveyInfo($surveyid, $language);
         // set document information
         $this->pdf->SetCreator(PDF_CREATOR);
         $this->pdf->SetAuthor('LimeSurvey');
         $this->pdf->SetTitle(sprintf(gT("Statistics survey %s"), $surveyid));
         $this->pdf->SetSubject($surveyInfo['surveyls_title']);
         $this->pdf->SetKeywords('LimeSurvey,' . gT("Statistics") . ', ' . sprintf(gT("Survey %s"), $surveyid));
         $this->pdf->SetDisplayMode('fullpage', 'two');
         $this->pdf->setLanguageArray($aPdfLanguageSettings['lg']);
         // set header and footer fonts
         $this->pdf->setHeaderFont(array($aPdfLanguageSettings['pdffont'], '', PDF_FONT_SIZE_MAIN));
         $this->pdf->setFooterFont(array($aPdfLanguageSettings['pdffont'], '', PDF_FONT_SIZE_DATA));
         // set default header data
         // Since png crashes some servers (and we can not try/catch that) we use .gif (or .jpg) instead
         $headerlogo = 'statistics.gif';
         $this->pdf->SetHeaderData($headerlogo, 10, gT("Quick statistics", 'unescaped'), gT("Survey") . " " . $surveyid . " '" . flattenText($surveyInfo['surveyls_title'], false, true, 'UTF-8') . "'");
         $this->pdf->SetFont($aPdfLanguageSettings['pdffont'], '', $aPdfLanguageSettings['pdffontsize']);
         // set default monospaced font
         $this->pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     }
     if ($outputType == 'xls') {
         /**
          * Initiate the Spreadsheet_Excel_Writer
          */
         require_once APPPATH . '/third_party/pear/Spreadsheet/Excel/Xlswriter.php';
         if ($pdfOutput == 'F') {
             $sFileName = $sTempDir . '/statistic-survey' . $surveyid . '.xls';
             $this->workbook = new Xlswriter($sFileName);
         } else {
             $this->workbook = new Xlswriter();
         }
         $this->workbook->setVersion(8);
         // Inform the module that our data will arrive as UTF-8.
         // Set the temporary directory to avoid PHP error messages due to open_basedir restrictions and calls to tempnam("", ...)
         $this->workbook->setTempDir($sTempDir);
         // Inform the module that our data will arrive as UTF-8.
         // Set the temporary directory to avoid PHP error messages due to open_basedir restrictions and calls to tempnam("", ...)
         if (!empty($sTempDir)) {
             $this->workbook->setTempDir($sTempDir);
         }
         if ($pdfOutput != 'F') {
             $this->workbook->send('statistic-survey' . $surveyid . '.xls');
         }
         // Creating the first worksheet
         $this->sheet = $this->workbook->addWorksheet(utf8_decode('results-survey' . $surveyid));
         $this->xlsPercents =& $this->workbook->addFormat();
         $this->xlsPercents->setNumFormat('0.00%');
         $this->formatBold =& $this->workbook->addFormat(array('Bold' => 1));
         $this->sheet->setInputEncoding('utf-8');
开发者ID:krsandesh,项目名称:LimeSurvey,代码行数:67,代码来源:statistics_helper.php

示例5: elang_pluginfile

/**
 * Serves the files from the elang file areas
 *
 * @param   stdClass  $course         the course object
 * @param   stdClass  $cm             the course module object
 * @param   stdClass  $context        the elang's context
 * @param   string    $filearea       the name of the file area
 * @param   array     $args           extra arguments (itemid, path)
 * @param   boolean   $forcedownload  whether or not force download
 * @param   array     $options        additional options affecting the file serving
 *
 * @return  void
 *
 * @category  files
 *
 * @since   0.0.1
 */
function elang_pluginfile($course, $cm, $context, $filearea, array $args, $forcedownload, array $options = array())
{
    global $DB, $CFG, $USER;
    require_once dirname(__FILE__) . '/locallib.php';
    if ($context->contextlevel != CONTEXT_MODULE) {
        send_file_not_found();
    }
    require_login($course, true, $cm);
    if (!has_capability('mod/elang:view', $context)) {
        send_file_not_found();
    }
    if ($filearea == 'subtitle') {
        $vtt = new \Captioning\Format\WebvttFile();
        $idlang = $cm->instance;
        $records = $DB->get_records('elang_cues', array('id_elang' => $idlang), 'begin ASC');
        $elang = $DB->get_record('elang', array('id' => $idlang));
        $options = json_decode($elang->options, true);
        $repeatedunderscore = isset($options['repeatedunderscore']) ? $options['repeatedunderscore'] : 10;
        $i = 0;
        $users = $DB->get_records('elang_users', array('id_elang' => $idlang, 'id_user' => $USER->id), '', 'id_cue,json');
        foreach ($records as $id => $record) {
            if (isset($users[$id])) {
                $data = json_decode($users[$id]->json, true);
            } else {
                $data = array();
            }
            $cue = new \Captioning\Format\WebvttCue(\Captioning\Format\WebvttCue::ms2tc($record->begin), \Captioning\Format\WebvttCue::ms2tc($record->end), Elang\generateCueText(json_decode($record->json, true), $data, '-', $repeatedunderscore));
            $i++;
            $cue->setIdentifier($i);
            $vtt->addCue($cue);
        }
        send_file($vtt->build()->getFileContent(), end($args), 0, 0, true, false, 'text/vtt');
    } elseif ($filearea == 'pdf') {
        $idlang = $cm->instance;
        $records = $DB->get_records('elang_cues', array('id_elang' => $idlang), 'begin ASC');
        $elang = $DB->get_record('elang', array('id' => $idlang));
        $options = json_decode($elang->options, true);
        $repeatedunderscore = isset($options['repeatedunderscore']) ? $options['repeatedunderscore'] : 10;
        require_once $CFG->libdir . '/pdflib.php';
        $doc = new pdf();
        $doc->SetMargins(isset($options['left']) ? $options['left'] : 20, isset($options['top']) ? $options['top'] : 20);
        $doc->SetFont('', '', isset($options['size']) ? $options['size'] : 16);
        $doc->setPrintHeader(false);
        $doc->setPrintFooter(false);
        $doc->AddPage();
        $doc->WriteHtml('<h1>' . sprintf(get_string('pdftitle', 'elang'), $course->fullname) . '</h1>');
        $doc->WriteHtml('<h2>' . sprintf(get_string('pdfsubtitle', 'elang'), Elang\generateTitle($elang, $options), userdate($elang->timecreated, get_string('strftimedaydate'))) . '</h2>');
        $doc->WriteHtml($elang->intro);
        $i = 1;
        foreach ($records as $id => $record) {
            $doc->Write(5, '', '', false, '', true);
            $doc->WriteHtml('<h3>' . sprintf(get_string('pdfcue', 'elang'), $i++, \Captioning\Format\WebvttCue::ms2tc($record->begin), \Captioning\Format\WebvttCue::ms2tc($record->end)) . '</h3>');
            $doc->Write(5, Elang\generateCueText(json_decode($record->json, true), array(), '_', $repeatedunderscore), '', false, '', true);
        }
        send_file($doc->Output('', 'S'), end($args), 0, 0, true, false, 'application/pdf');
    } else {
        $fs = get_file_storage();
        $relativepath = implode('/', $args);
        $fullpath = rtrim('/' . $context->id . '/mod_elang/' . $filearea . '/0/' . $relativepath, '/');
        $file = $fs->get_file_by_hash(sha1($fullpath));
        if (!$file) {
            send_file_not_found();
        }
        send_stored_file($file, 86400, 0, $forcedownload, $options);
    }
}
开发者ID:e-lang,项目名称:moodle-mod_elang,代码行数:83,代码来源:lib.php

示例6: die

	SUM(IF(rcd.tipo='R' AND rcd.condicion='POR COBRAR-CONTADO',rcd.totalgral,0))cobcont,
	SUM(IF(rcd.tipo='R' AND rcd.condicion='POR COBRAR-CREDITO',rcd.totalgral,0))cobcred,
	ROUND(SUM(rcd.totalgral),2)total,ROUND(SUM(rcd.totalcom),2)importe,
	ROUND(SUM(rcd.totalgral)-SUM(rcd.totalcom),2)liquidar
	FROM moduloconcesiones mc
	INNER JOIN reporte_concesiondetalle rcd ON mc.folio=rcd.folio AND mc.sucursal=rcd.sucursal
	INNER JOIN catalogosucursal cs ON mc.sucursal=cs.id
	WHERE mc.folio='$_GET[folio]' AND mc.sucursal=$_GET[sucursal] ";
	$r = mysql_query($s,$l) or die($s);
	$f = mysql_fetch_object($r);
	
	$pdf = new pdf();
	$pdf->AliasNbPages();
	$pdf -> AddPage();
	$pdf -> Ln(10);
	$pdf -> SetFont("Arial","",8);
	
	
	$contenido = 'CONCESIONARIO: '.$f->nconcesionario.'
OFICINA: '.$f->oficina.'
ADJUNTO A LA PRESENTE SIRVASE ENCONTRAR LIQUIDACION CORRESPONDIENTE DE LA FECHA '.$f->fecha2.'


CON LOS SIGUIENTES IMPORTES A LIQUIDAR
VENTA DE FLETES ENVIADOS PAGADOS CONTADO                                                                                                          $ '.number_format($f->pagcont,2).'	
VENTA DE FLETES ENVIADOS PAGADOS CREDITO                                                                                                               $ '.number_format($f->pagcred,2).'
RECIBIDO DE FLETES RECIBIDOS POR COBRAR CONTADO                                                                                           $ '.number_format($f->cobcont,2).'
RECIBIDO DE FLETES RECIBIDOS POR COBRAR CREDITO                                                                                                  $ '.number_format($f->cobcred,2).'
';
$contenido2 = 'TOTAL A PAGAR                                                                                                                                                                    $ '.number_format($f->total,2).'
	
开发者ID:sigmadesarrollo,项目名称:logisoft,代码行数:30,代码来源:acusereciboconcesion_20110630.php

示例7: foreach

 $doc->SetAuthor('Moodle ' . $CFG->release);
 $doc->SetCreator('lib/tests/other/pdflibtestpage.php');
 $doc->SetKeywords('Moodle, PDF');
 $doc->SetSubject('This has been generated by Moodle as its PDF library test page');
 $doc->SetMargins(15, 30);
 $doc->setPrintHeader(true);
 $doc->setHeaderMargin(10);
 $doc->setHeaderFont(array($fontfamily, 'b', 10));
 $doc->setHeaderData('pix/moodlelogo-med-white.gif', 40, $SITE->fullname, $CFG->wwwroot);
 $doc->setPrintFooter(true);
 $doc->setFooterMargin(10);
 $doc->setFooterFont(array($fontfamily, '', 8));
 $doc->AddPage();
 $doc->SetTextColor(255, 255, 255);
 $doc->SetFillColor(255, 203, 68);
 $doc->SetFont($fontfamily, 'B', 24);
 $doc->Cell(0, 0, 'Moodle PDF library test', 0, 1, 'C', 1);
 $doc->SetFont($fontfamily, '', 12);
 $doc->Ln(6);
 $doc->SetTextColor(0, 0, 0);
 $c = '<h3>General information</h3>';
 $c .= 'Moodle release: ' . $CFG->release . '<br />';
 $c .= 'PDF producer: TCPDF ' . TCPDF_STATIC::getTCPDFVersion() . ' (http://www.tcpdf.org) <br />';
 $c .= 'Font family used: ' . $fontfamily . '<br />';
 $c .= '<h3>Current settings</h3>';
 $c .= '<table border="1"  cellspacing="0" cellpadding="1">';
 foreach (array('K_PATH_MAIN', 'K_PATH_URL', 'K_PATH_FONTS', 'PDF_FONT_NAME_MAIN', 'K_PATH_CACHE', 'K_PATH_IMAGES', 'K_BLANK_IMAGE', 'K_CELL_HEIGHT_RATIO', 'K_SMALL_RATIO', 'PDF_CUSTOM_FONT_PATH', 'PDF_DEFAULT_FONT') as $setting) {
     if (defined($setting)) {
         $c .= '<tr style="font-size: x-small;"><td>' . $setting . '</td><td>' . constant($setting) . '</td></tr>';
     }
 }
开发者ID:EmmanuelYupit,项目名称:educursos,代码行数:31,代码来源:pdflibtestpage.php

示例8: datenbank

		function ma2_pdf($id){
		$return="";
		$db=new datenbank();
		$query="select * from rechnungen,mahnungen  where rechnungen.renr=mahnungen.renr and mahnungen.manr='$id'";
		$result=$db->query($query);
		$rechnung=$db->get_object($result);
		$result_kunde=$db->query("select * from kunden where kdnr=$rechnung->kunde");
		$kunde=$db->get_object($result_kunde);
		$pdf=new pdf('P', 'mm', 'A4');
		$pdf->Open();
		$pdf->AddPage();
		$pdf->empfaenger($kunde->firma, $kunde->strasse." ".$kunde->hausnummer, $kunde->plz." ".$kunde->ort, $rechnung->manr, $rechnung->datum);
		$pdf->SetFont('Arial','B',12);
		$pdf->Cell(80,5,"Mahnung");
		$pdf->Ln(10);
		$pdf->SetFont("Arial", "", 10);
		$pdf->Write(5, "Sehr geehrte Damen und Herren,\nleider konnte ich noch keinen Zahlungseingang zur Rechnung $rechnung->renr feststellen. Hier die Auflistung der aufgrund dieser Rechnung unbezahlten Posten::\n\n");
		$query="select posten.datum as Datum, posten.kommentar as Beschreibung, posten.anzahl as Anzahl, produkte.name as Artikel, produkte.preis as Preis, (produkte.preis*posten.anzahl) as Summe from posten, produkte where posten.rechnung='$rechnung->renr' and produkte.id=posten.produkt";
		$result=$db->query($query);
		$header=array("Datum", "Beschreibung", "Anzahl", "Artikel", "Preis", "Summe");
		while($data[]=$db->get_row($result))
		{
		}
		$gammel=array_pop($data);
		$pdf->table($header, $data);
		$pdf->Ln();
		$result=$db->query("SELECT Sum( posten.anzahl * produkte.preis )  AS Gesamt, Sum( posten.anzahl * produkte.preis * mwst.satz / 100  ) AS MWST, mwst.satz FROM posten, produkte, mwst WHERE produkte.id = posten.produkt AND mwst.id = produkte.mwst AND posten.rechnung =  '$rechnung->renr' AND produkte.id!='3' AND produkte.id!='4' GROUP BY mwst.satz");
		$betrag=$db->get_object($result);
		$result=$db->query("SELECT Sum( posten.anzahl * produkte.preis )  AS Gesamt, Sum( posten.anzahl * produkte.preis * mwst.satz / 100  ) AS MWST, mwst.satz FROM posten, produkte, mwst WHERE produkte.id = posten.produkt AND mwst.id = produkte.mwst AND posten.rechnung =  '$rechnung->renr' AND produkte.id ='3' GROUP BY mwst.satz");
		$betrag2=$db->get_object($result);
		$result=$db->query("SELECT Sum( posten.anzahl * produkte.preis )  AS Gesamt, Sum( posten.anzahl * produkte.preis * mwst.satz / 100  ) AS MWST, mwst.satz FROM posten, produkte, mwst WHERE produkte.id = posten.produkt AND mwst.id = produkte.mwst AND posten.rechnung =  '$rechnung->renr' AND produkte.id ='4' GROUP BY mwst.satz");
		$betrag3=$db->get_object($result);
		$pdf->Cell(100,5,"", 0, 0, 'L');
		$pdf->Cell(35,5,"Gesamt:",0,0,'L');
		$pdf->Cell(20,5,number_format(($betrag->Gesamt+$betrag2->Gesamt+$betrag3->Gesamt),2,",",".").EURO, 0, 1, 'R');
		$pdf->Cell(100,5,"", 0, 0, 'L');
		$pdf->Cell(35,5,"Mehrwertsteuer (".number_format($betrag->satz)."%):", 0, 0, 'L');
		$pdf->Cell(20,5,number_format($betrag->MWST,2,",",".").EURO, 0, 1, 'R');
		$pdf->Ln();
		$pdf->Cell(100,5,"", 0, 0, 'L');
		$pdf->Cell(35,5,"Mahnbetrag:", 0, 0, 'L');
		$pdf->Cell(20,5,number_format($betrag2->Gesamt+$betrag->Gesamt+$betrag3->Gesamt+$betrag->MWST,2,",",".").EURO, 0, 1, 'R');
		$pdf->Ln();
		$pdf->Write(5, "Bitte überweisen Sie den oben genannten Betrag bis spätestens zum $rechnung->faellig auf das unten aufgeführte Konto.\nÜber eine weitere Zusammenarbeit mit Ihnen würde ich mich sehr freuen und verbleibe mit freundlichen Grüßen\n");
		$pdf->Ln(15);
		$pdf->Write(5, $GLOBALS["conf"]["rechnung"]["adresse"]["name"]);
		$pdf->Image($GLOBALS["conf"]["rechnung"]["unterschrift"],25,$pdf->GetY()-10,50);
		$this->output=0;
		$pdf->Output();
		return $return;
	}
开发者ID:BackupTheBerlios,项目名称:webfaktura,代码行数:51,代码来源:class.kunden.inc.php

示例9:

    $pdf->CreateTextBox('Factura #' . $booking->id, 0, 90, 120, 20, 16);
    // date, order ref
    $date = date_create($booking->date_booking);
    $pdf->CreateTextBox('Fecha: ' . date_format($date, "d/m/Y H:i:s"), 0, 100, 0, 10, 10, '', 'R');
    $pdf->CreateTextBox('Order ref.: #' . $booking->id, 0, 105, 0, 10, 10, '', 'R');
    // ROWS
    // list headers
    $pdf->CreateTextBox('Dias', 0, 120, 20, 10, 10, 'B', 'C');
    $pdf->CreateTextBox('Habitacion', 20, 120, 90, 10, 10, 'B');
    $pdf->CreateTextBox('Precio', 110, 120, 30, 10, 10, 'B', 'R');
    $pdf->CreateTextBox('Total', 140, 120, 30, 10, 10, 'B', 'R');
    $pdf->Line(20, 129, 195, 129);
    $currY = 128;
    $pdf->CreateTextBox($booking->getDays(), 0, $currY, 20, 10, 10, '', 'C');
    $pdf->CreateTextBox($room->name, 20, $currY, 90, 10, 10, '');
    $pdf->CreateTextBox('€' . $room->price, 110, $currY, 30, 10, 10, '', 'R');
    $pdf->CreateTextBox('€' . $booking->getTotal(), 140, $currY, 30, 10, 10, '', 'R');
    $currY = $currY + 5;
    $pdf->Line(20, $currY + 4, 195, $currY + 4);
    // FOOTER
    // output the total row
    $pdf->CreateTextBox('Total', 20, $currY + 5, 135, 10, 10, 'B', 'R');
    $pdf->CreateTextBox('€' . number_format($booking->getTotal(), 2, '.', ''), 140, $currY + 5, 30, 10, 10, 'B', 'R');
    // some payment instructions or information
    $pdf->setXY(20, $currY + 30);
    $pdf->SetFont(PDF_FONT_NAME_MAIN, '', 10);
    $pdf->MultiCell(175, 10, '<em>Lorem ipsum dolor sit amet, consectetur adipiscing elit</em>.
	Vestibulum sagittis venenatis urna, in pellentesque ipsum pulvinar eu. In nec <a href="http://www.google.com/">nulla libero</a>, eu sagittis diam. Aenean egestas pharetra urna, et tristique metus egestas nec. Aliquam erat volutpat. Fusce pretium dapibus tellus.', 0, 'L', 0, 1, '', '', true, null, true);
    //Close and output PDF document
    $pdf->Output('factura_' . $booking->id . '.pdf', 'D');
}
开发者ID:erseco,项目名称:ugr_sistemas_de_informacion_basados_en_web,代码行数:31,代码来源:pdf.php

示例10:

 if ($cor == "#EFE029") {
     $cor = "#E4F471";
 } else {
     if ($cor == "#E4F471") {
         $cor = "#EFE029";
     }
 }
 if (in_array($k00_tipo, $tipos) == true) {
     if ($linha++ > $TPagina) {
         $linha = 0;
         $pdf->AddPage();
         $pdf->SetFillColor(235);
         $pdf->SetLineWidth(0.5);
         $pdf->Ln(3);
         $pdf->Cell(191, 2, '', "T", 1, "R", 0);
         $pdf->SetFont('Arial', 'B', 8);
         $pdf->Cell(25, 5, $outros3, 0, 0, "L", 0);
         $pdf->SetFont('Arial', 'I', 8);
         $pdf->Cell(80, 5, ': ' . $chave . '    ' . @$outros4, 0, 1, "L", 0);
         $pdf->SetFont('Arial', 'B', 8);
         $pdf->Cell(25, 5, "NOME", 0, 0, "L", 0);
         $pdf->SetFont('Arial', 'I', 8);
         $pdf->Cell(80, 5, ': ' . $nome, 0, 1, "L", 0);
         $pdf->SetFont('Arial', 'B', 8);
         $pdf->Cell(25, 5, "ENDEREÇO", 0, 0, "L", 0);
         $pdf->SetFont('Arial', 'I', 8);
         $pdf->Cell(80, 5, ': ' . $ender, 0, 1, "L", 0);
         if ($outros1 != '') {
             $pdf->SetFont('Arial', 'B', 8);
             $pdf->Cell(25, 5, $outros1, 0, 0, "L", 0);
             $pdf->SetFont('Arial', 'I', 8);
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:31,代码来源:cai3_gerfinanc011.php

示例11: array

global $CFG,$DB;
require_once ('../../config.php');
require_once($CFG->dirroot.'/local/graduation/lib.php');
require_once($CFG->dirroot.'/local/lib.php'); 
$curid = optional_param ('curid', 0, PARAM_INT);
$userid = optional_param ('userid', 0, PARAM_INT);
$prgid = optional_param ('prgid', 0, PARAM_INT);
$year = optional_param ('year', 0, PARAM_INT);
ob_clean() ;
require_once($CFG->dirroot.'/lib/pdflib.php');

$doc = new pdf;
$doc->setPrintHeader(false);
$doc->setPrintFooter(false);
$doc->AddPage();
$doc->SetFont('times', 'B', 25, '', 'false');
$gradst = $DB->get_record('local_graduation', array('userid'=>$userid, 'curriculumid'=>$curid, 'programid'=>$prgid));
$txt = $DB->get_field('local_school', 'fullname', array('id'=>$gradst->schoolid));
$doc->Write(0, $txt, '', 0, 'C', true, 0, false, false, 20);
$linestyle = array('width' => 0.1, 'cap' => 'round', 'join' => 'round', 'dash' => '2', 'phase' => 0, 'color' => array(0, 0, 0));
$doc->Line(10, 22, 200, 22, $linestyle);
$doc->SetFont('times', 'BI', 14, '', 'false');
$txt = get_string('memo', 'local_graduation');
$doc->Write(12, $txt, '', 0, 'C', true, 0, false, false, 20);
$linestyle = array('width' => 0.1, 'cap' => 'round', 'join' => 'round', 'dash' => '2', 'phase' => 0, 'color' => array(0, 0, 0));
$doc->Line(80, 30, 130, 30, $linestyle);
$doc->SetFont('times', '', 12, '', 'false');
$gradst = $DB->get_record('local_graduation', array('userid'=>$userid, 'curriculumid'=>$curid, 'programid'=>$prgid));
$gradst->userid;$gradst->programid;$gradst->curriculumid;
$table = '<table>
<tr><td style="width:100px;" align="right"><b>Student Name</b></td><td style="width:170px;"> : ' .''.$DB->get_field('user', 'firstname', array('id'=>$gradst->userid)). ' ' . $DB->get_field('user', 'lastname', array('id'=>$gradst->userid)) . '</td>
开发者ID:anilch,项目名称:Personel,代码行数:31,代码来源:memo_pdf.php


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