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


PHP FPDF::SetSubject方法代码示例

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


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

示例1: save


//.........这里部分代码省略.........
						$borders .= 'T';
						$pdf->SetDrawColor(
							hexdec(substr($style->getBorders()->getTop()->getColor()->getRGB(), 0, 2)),
							hexdec(substr($style->getBorders()->getTop()->getColor()->getRGB(), 2, 2)),
							hexdec(substr($style->getBorders()->getTop()->getColor()->getRGB(), 4, 2))
						);
					}
	    			if ($style->getBorders()->getBottom()->getBorderStyle() != PHPExcel_Style_Border::BORDER_NONE) {
						$borders .= 'B';
						$pdf->SetDrawColor(
							hexdec(substr($style->getBorders()->getBottom()->getColor()->getRGB(), 0, 2)),
							hexdec(substr($style->getBorders()->getBottom()->getColor()->getRGB(), 2, 2)),
							hexdec(substr($style->getBorders()->getBottom()->getColor()->getRGB(), 4, 2))
						);
					}
					if ($borders == '') {
						$borders = 0;
					}
					if ($sheet->getShowGridlines()) {
						$borders = 'LTRB';
					}

	    			// Image?
			    	$iterator = $sheet->getDrawingCollection()->getIterator();
			    	while ($iterator->valid()) {
			    		if ($iterator->current()->getCoordinates() == PHPExcel_Cell::stringFromColumnIndex($column) . ($row + 1)) {
			    			try {
				    			$pdf->Image(
				    				$iterator->current()->getPath(),
				    				$pdf->GetX(),
				    				$pdf->GetY(),
				    				$iterator->current()->getWidth(),
				    				$iterator->current()->getHeight(),
				    				'',
				    				$this->_tempDir
				    			);
			    			} catch (Exception $ex) { }
			    		}

			    		$iterator->next();
			    	}

	    			// Print cell
	    			$pdf->MultiCell(
	    				$cellWidth,
	    				$cellHeight,
	    				$cellData,
	    				$borders,
	    				$alignment,
	    				($style->getFill()->getFillType() == PHPExcel_Style_Fill::FILL_NONE ? 0 : 1)
	    			);

			    	// Coordinates
			    	$endX = $pdf->GetX();
			    	$endY = $pdf->GetY();

			    	// Revert to original Y location
			    	if ($endY > $startY) {
			    		$pdf->SetY($startY);
			    		if ($lineHeight < $lineHeight + ($endY - $startY)) {
			    			$lineHeight = $lineHeight + ($endY - $startY);
			    		}
			    	}
			    	$pdf->SetX($startX + $singleCellWidth);

			    	// Hyperlink?
			    	if ($sheet->getCellByColumnAndRow($column, $row)->hasHyperlink()) {
			    		if (!$sheet->getCellByColumnAndRow($column, $row)->getHyperlink()->isInternal()) {
			    			$pdf->Link(
			    				$startX,
			    				$startY,
			    				$endX - $startX,
			    				$endY - $startY,
			    				$sheet->getCellByColumnAndRow($column, $row)->getHyperlink()->getUrl()
			    			);
			    		}
			    	}
				}

				// Garbage collect!
				$sheet->garbageCollect();

				// Next line...
				$pdf->Ln($lineHeight);
	    	}
		}

		// Document info
		$pdf->SetTitle($this->_phpExcel->getProperties()->getTitle());
		$pdf->SetAuthor($this->_phpExcel->getProperties()->getCreator());
		$pdf->SetSubject($this->_phpExcel->getProperties()->getSubject());
		$pdf->SetKeywords($this->_phpExcel->getProperties()->getKeywords());
		$pdf->SetCreator($this->_phpExcel->getProperties()->getCreator());

		// Write to file
		fwrite($fileHandle, $pdf->output($pFilename, 'S'));

		// Close file
		fclose($fileHandle);
	}
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:101,代码来源:PDF.php

示例2:

	// si la variable $gepiSchoolName est vide alors on cherche les informations dans la base
	if ( empty($gepiSchoolName) )
	{

		$gepiSchoolName=getSettingValue('gepiSchoolName');

	}

	// création du document
	$pdf->SetCreator($gepiSchoolName);
	// auteur du document
	$pdf->SetAuthor($gepiSchoolName);
	// mots clé
	$pdf->SetKeywords('');
	// sujet du document
	$pdf->SetSubject('Bilan journalier des absences');
	// titre du document
	$pdf->SetTitle('Bilan journalier des absences');
	// méthode d'affichage du document à son ouverture
	$pdf->SetDisplayMode('fullwidth', 'single');
	// compression du document
	$pdf->SetCompression(TRUE);
	// change automatiquement de page à 5mm du bas
	$pdf->SetAutoPageBreak(TRUE, 5);


/* **************************** */
/* début de la boucle des pages */

// comptage du nombre de page traité
$nb_page_traite = 0;
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:bilan_absences_quotidien_pdf.php

示例3: FPDF

<?php

session_start();
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
if (isset($_GET['report']) && $_GET['report'] == 'true') {
    $MAX_LIMIT = 8;
    require_once '../includes/fpdf.php';
    $pdf = new FPDF('L', 'cm', array(7.7, 15.9));
    $pdf->SetAuthor("imranzahid+corpus@gmail.com");
    $pdf->SetSubject("Cheque");
    $pdf->SetTitle("Cheque");
    $pdf->SetCreator("Imran Zahid");
    $pdf->AddPage();
    $pdf->SetFont('Arial', '', 12);
    $amt = explode(' ', convertCurrency($_GET['amount']) . " Only.");
    $str1 = "";
    $sep = "";
    $w = 0;
    $counter = 0;
    do {
        $temp = $str1 . $sep . $amt[$counter];
        $w = $pdf->GetStringWidth($temp);
        if ($w < $MAX_LIMIT) {
            $str1 .= $sep . $amt[$counter];
            $sep = " ";
            $counter++;
        }
        if ($counter > count($amt)) {
            break;
        }
开发者ID:kashifnasim,项目名称:nexexcel,代码行数:31,代码来源:cheque.php

示例4: printBody

$listOfSignatories["id"] = $signatorial_model->getSign_ID();
$clearance_model = new ClearanceStatus();
foreach ($listOfSignatories["id"] as $key => $value) {
    $status = $clearance_model->getOverallSignatoryClearanceStatus($stud_id, $value, $current_sysemID);
    if ($status == "No Requirements") {
        $status = "Cleared";
    }
    $listOfSignatories["status"][$key] = $status;
}
//var_dump($listOfSignatories);
$fpdf = new FPDF('P', 'mm', 'Legal');
$fpdf->SetDisplayMode('fullpage', 'continuous');
$fpdf->SetTitle("SOCS Clearance - Export Copy");
$fpdf->SetCreator("USEP SOCS");
$fpdf->SetAuthor("University of Southeastern Philippines");
$fpdf->SetSubject("Electronic Clearance (export copy)");
$fpdf->SetMargins(15, 15, 15);
$fpdf->AddPage();
$fpdf->SetY('15');
$fpdf->Image('logo.jpg', 13, $fpdf->GetY() - 5, 25);
printBody();
$fpdf->Cell(0, 0, "Registrar's Copy", 0, 1, 'R', false);
$fpdf->Ln(4);
$fpdf->Cell(0, 0, "", 1, 1, 'L', true);
$fpdf->Ln(4);
$fpdf->Cell(0, 0, "Adviser's Copy", 0, 1, 'R', false);
$fpdf->SetY($fpdf->GetY() + 10);
$fpdf->Image('logo.jpg', 13, $fpdf->GetY() - 5, 25);
printBody();
function printBody()
{
开发者ID:bilfspk,项目名称:student-online-clearance-system,代码行数:31,代码来源:export.php

示例5: FPDF

 /**
  * Download task list as attachment
  *
  * @access public
  * @param void
  * @return null
  */
 function download_list()
 {
     $task_list = ProjectTaskLists::findById(get_id());
     if (!$task_list instanceof ProjectTaskList) {
         flash_error(lang('task list dnx'));
         $this->redirectTo('task');
     }
     // if
     $this->canGoOn();
     if (!$task_list->canView(logged_user())) {
         flash_error(lang('no access permissions'));
         $this->redirectToReferer(get_url('task'));
     }
     // if
     $output = array_var($_GET, 'output', 'csv');
     $project_name = active_project()->getName();
     $task_list_name = $task_list->getName();
     $task_count = 0;
     if ($output == 'pdf') {
         Env::useLibrary('fpdf');
         $download_name = "{$project_name}-{$task_list_name}-tasks.pdf";
         $download_type = 'application/pdf';
         $pdf = new FPDF();
         $pdf->AddPage();
         $pdf->SetTitle($task_list_name);
         $pdf->SetCompression(true);
         $pdf->SetCreator('ProjectPier');
         $pdf->SetDisplayMode(fullpage, single);
         $pdf->SetSubject(active_project()->getObjectName());
         $pdf->SetFont('Arial', 'B', 16);
         $task_lists = active_project()->getOpenTaskLists();
         $pdf->Cell(0, 10, lang('project') . ': ' . active_project()->getObjectName(), 'C');
         $pdf->Ln();
         foreach ($task_lists as $task_list) {
             $pdf->SetFont('Arial', 'B', 14);
             $pdf->Write(10, lang('task list') . ': ' . $task_list->getObjectName());
             $pdf->Ln();
             $tasks = $task_list->getTasks();
             $line = 0;
             // Column widths
             $w = array(10, 0, 0);
             // Header
             //for($i=0;$i<count($header);$i++)
             //  $this->Cell($w[$i],7,$header[$i],1,0,'C');
             //$this->Ln();
             $pdf->SetFont('Arial', 'I', 14);
             foreach ($tasks as $task) {
                 $line++;
                 if ($task->isCompleted()) {
                     $task_status = lang('completed');
                     $pdf->SetTextColor(100, 200, 100);
                     $task_completion_info = lang('completed task') . ' : ' . format_date($task->getCompletedOn());
                 } else {
                     $task_status = lang('open');
                     $pdf->SetTextColor(255, 0, 0);
                     $task_completion_info = lang('due date') . ' : ' . lang('not assigned');
                     if ($task->getDueDate()) {
                         $task_completion_info = lang('due date') . ' : ' . format_date($task->getDueDate());
                     }
                 }
                 if ($task->getAssignedTo()) {
                     $task_assignee = $task->getAssignedTo()->getObjectName();
                 } else {
                     $task_assignee = lang('not assigned');
                 }
                 $pdf->Cell($w[0], 6, $line);
                 $pdf->Cell($w[2], 6, $task_status, "TLRB");
                 $pdf->Ln();
                 $pdf->Cell($w[0], 6, '');
                 $pdf->SetTextColor(0, 0, 0);
                 $pdf->Cell($w[2], 6, $task_completion_info, "TLRB");
                 $pdf->Ln();
                 $pdf->Cell($w[0], 6, '');
                 $pdf->SetTextColor(0, 0, 0);
                 $pdf->Cell($w[2], 6, $task_assignee, "TLRB");
                 $pdf->Ln();
                 $pdf->Cell($w[0], 6, '');
                 $pdf->SetTextColor(0, 0, 0);
                 $pdf->MultiCell($w[2], 6, $task->getText(), "TLRB");
                 $pdf->Ln();
             }
         }
         $pdf->Output($download_name, 'D');
     } else {
         $download_name = "{$project_name}-{$task_list_name}-tasks.txt";
         $download_type = 'text/csv';
         $download_contents = $task_list->getDownloadText($task_count, "\t", true);
         download_contents($download_contents, $download_type, $download_name, strlen($download_contents));
     }
     die;
 }
开发者ID:bklein01,项目名称:Project-Pier,代码行数:98,代码来源:TaskController.class.php

示例6: parse_pdf_content

function parse_pdf_content($content, $member_id)
{
    // parse text content from Smarty to pdf content
    global $db, $config, $t;
    $pdf_content = '';
    $margins = array(mm_to_pt(20), mm_to_pt(20), mm_to_pt(20), mm_to_pt(20));
    //left, top, right, bottom (in points) 56pt ~= 20mm
    $font_size = 14;
    //points
    $pdf = new FPDF('P', 'pt', 'A4');
    // portrait, A4
    $pdf->SetCompression(false);
    $pdf->SetMargins($margins[0], $margins[1], $margins[2]);
    //only left, top, right margins. bottom margin equals to 20mm by default.
    $pdf->SetTitle('Your Invoice');
    $pdf->SetSubject('*** Your Payment');
    $pdf->SetAuthor('aMember');
    $pdf->AddPage();
    $pdf->SetFont('Arial', '', $font_size);
    $current_x = $pdf->GetX();
    $current_y = $pdf->GetY();
    $width = mm_to_pt(210);
    $height = mm_to_pt(270);
    $width = $width - $margins[0] - $margins[2];
    // target width
    $height = $height - $margins[1] - $margins[3];
    // target height
    $image = $config['root_dir'] . "/logo.jpg";
    // logo path to include in pdf at top-right corner
    if (is_file($image)) {
        $size = getimagesize($image);
        $x = $width - $size[0] + $margins[0];
        $y = $current_y;
        $pdf->Image($image, $x, $y, $size[0], $size[1]);
        // use original size
        $current_y += $size[1];
    }
    $current_y += $font_size;
    //pt
    $contacts = explode("\n", $config['invoice_contacts']);
    // output contact information right-aligned
    $max_length = 0;
    foreach ($contacts as $row) {
        $row = trim($row);
        $length = $pdf->GetStringWidth($row);
        if ($length > $max_length) {
            $max_length = $length;
        }
    }
    $x = $width - $max_length + $margins[0];
    $y = $current_y;
    foreach ($contacts as $row) {
        $row = trim($row);
        $attr = get_font_styles($row);
        $pdf->SetFont('Arial', $attr, $font_size);
        $pdf->Text($x, $y, strip_tags($row));
        $y += $font_size;
    }
    $current_y = $y;
    $pdf->SetFont('Arial', '', $font_size);
    //return font settings
    // customer contacts
    $u = $db->get_user($member_id);
    if (!$t) {
        $t =& new_smarty();
    }
    $t->assign('u', $u);
    $cust_contacts = $t->fetch('mail_receipt_contact.pdf.txt');
    $cust_contacts = explode("\n", $cust_contacts);
    // output contact information left-aligned
    $num_rows = count($contacts);
    $x = $margins[0];
    $y = $current_y - $font_size * $num_rows;
    // $num_rows rows up from contact information and output customer data
    foreach ($cust_contacts as $row) {
        $row = trim($row);
        $attr = get_font_styles($row);
        $pdf->SetFont('Arial', $attr, $font_size);
        $pdf->Text($x, $y, strip_tags($row));
        $y += $font_size;
    }
    $current_y = $y;
    /*
    $y = $current_y - $font_size * 4; // 4 rows up from contact information and output customer data
    
    $string = $u['name_f'] . ' ' . $u['name_l'];
    $pdf->Text ($x, $y, $string);
    $y += $font_size;
    
    $string = $u['street'];
    $pdf->Text ($x, $y, $string);
    $y += $font_size;
    
    $string = $u['zip'] . ' ' . $u['city'];
    $pdf->Text ($x, $y, $string);
    $y += $font_size;
    
    	$state = db_getStateByCode($u['country'], $u['state']);
    	$country = db_getCountryByCode($u['country']);
    $string = $state .  ' '  . $country;
//.........这里部分代码省略.........
开发者ID:subashemphasize,项目名称:test_site,代码行数:101,代码来源:common.inc.php

示例7: FPDF

    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
//
// $Id: gen_facture.php 532 2007-06-14 10:39:19Z thierry $
// Génère un PDF pour une facture
require "../inc/main.php";
# If user is not logged, generate a PDF with an explicit error message
if (!isset($_SESSION['id_user']) || $_SESSION['id_user'] < 1) {
    $pdf = new FPDF('P', 'mm', 'A4');
    $pdf->SetMargins(10, 10, 10);
    $pdf->SetDisplayMode('fullwidth');
    $pdf->SetAutoPageBreak(true);
    $pdf->AddPage();
    $pdf->SetFont('Arial', '', 12);
    $pdf->Cell(190, 20, _("You are not authenticated"));
    $pdf->SetSubject(_('Error'));
    $pdf->SetTitle(_('Error'));
    $pdf->Output(_("Error") . ".pdf", "I");
    die;
}
# Check if the invoice id is defined
if (!isset($_GET['id']) or !is_numeric($_GET['id'])) {
    die(_("Error: Missing invoice id"));
}
$docs = false;
if ($_GET['docs'] == 1) {
    $docs = true;
}
$invoice = new Facture();
$filename = $invoice->generatePDF($_GET['id'], false, $target = 'file', $docs);
header('Content-Type: application/pdf');
开发者ID:lopacinski,项目名称:WebFinance,代码行数:31,代码来源:gen_facture.php

示例8: generar_pdf

 public function generar_pdf($id_cor, $id_direccion_gen)
 {
     $correspondencia = $this->ivss_model->core_parcial($id_cor)->result();
     $direccion_general = $this->ivss_model->ver_direccion_general_especifica($id_direccion_gen);
     foreach ($correspondencia as $cor_item) {
         $id_cor_oficio = $cor_item->id_cor;
         $num_control_oficio = $cor_item->num_control;
         $dir_origen_oficio = $cor_item->dir_origen;
         $remitente_oficio = $cor_item->remitente;
         $dir_destino_oficio = $cor_item->dir_destino;
         $asunto_oficio = $cor_item->asunto;
         $descripcion_oficio = $cor_item->descripcion;
         $fecha_crea_oficio = $cor_item->fecha_creacion;
     }
     $datos_director = $this->ivss_model->ver_dir_gen_especifica2($dir_destino_oficio)->result();
     foreach ($datos_director as $dir) {
         $nombre_director = $dir->nombre_director;
         $resolucion_director = $dir->resolucion_director;
     }
     $this->load->library('fpdf/fpdf');
     $pdf = new FPDF('P');
     $pdf->AddPage();
     $pdf->SetTitle("correspondencia", true);
     $pdf->SetFont('Arial', 'B', 16);
     $pdf->Image($this->config->base_url() . 'fronted/img/banner_institucional.png', 20, 8, 170);
     $pdf->AliasNbPages();
     $pdf->SetSubject("Sistema de correspondencia");
     $pdf->Image($this->config->base_url() . 'fronted/img/logogrande.png', 20, 25, 17);
     $pdf->SetFont('Arial', '', 9);
     $pdf->Text(68, 30, "REPUBLICA BOLIVARIANA DE VENEZUELA");
     $pdf->Text(42, 40, "MINISTERIO DEL PODER POPULAR PARA EL PROCESO SOCIAL DEL TRABAJO");
     $pdf->Text(62, 50, "INSTITUTO VENEZOLANO DE LOS SEGUROS SOCIALES");
     $pdf->SetLeftMargin(20.0);
     $pdf->SetRightMargin(20.0);
     $pdf->SetFont('Arial', 'B', 12);
     $pdf->Text(20, 70, "OFICIO:");
     $pdf->SetFont('Arial', '', 12);
     $pdf->Text(44, 70, $num_control_oficio);
     $pdf->SetFont('Arial', 'B', 12);
     $pdf->Text(20, 80, "PARA:");
     $pdf->SetFont('Arial', 'b', 12);
     #$pdf->Text(44,80,strtoupper(utf8_decode($nombre_director)));
     $pdf->Text(44, 80, strtoupper(utf8_decode("JACINTO PEREZ BONALDE SANCHEZ")));
     $pdf->SetFont('Arial', '', 12);
     $pdf->Text(44, 90, utf8_decode($dir_destino_oficio));
     $pdf->SetFont('Arial', 'B', 12);
     $pdf->Text(20, 100, "DE:");
     $pdf->SetFont('Arial', 'b', 12);
     $pdf->Text(44, 100, utf8_decode($remitente_oficio));
     $pdf->SetFont('Arial', '', 12);
     $pdf->Text(44, 110, utf8_decode(end(explode("-", $dir_origen_oficio))));
     $pdf->SetFont('Arial', 'B', 12);
     $pdf->Text(20, 120, "FECHA:");
     $pdf->SetFont('Arial', '', 12);
     $pdf->Text(44, 120, $fecha_crea_oficio);
     $pdf->SetFont('Arial', 'B', 12);
     $pdf->Text(20, 130, "ASUNTO:");
     $pdf->SetFont('Arial', '', 12);
     $pdf->Text(44, 130, utf8_decode($asunto_oficio));
     $pdf->SetXY(10, 140);
     $pdf->SetFont('Arial', '', 10);
     $pdf->SetTopMargin(2.0);
     $pdf->SetLeftMargin(20.0);
     $pdf->SetRightMargin(20.0);
     $pdf->MultiCell(0, 7, utf8_decode($descripcion_oficio));
     $pdf->SetFont('Arial', 'b', 10);
     $pdf->Text(93, 245, "Atentamente");
     $pdf->Line(50, 264, 160, 264);
     #$pdf->Image($this->config->base_url().'fronted/img/FIRMADIGITAL.png',52,230,115);
     $pdf->SetFont('Arial', '', 10);
     $pdf->Text(75, 268, utf8_decode($remitente_oficio));
     $pdf->SetFont('Arial', '', 10);
     $pdf->Text(88, 272, utf8_decode("Director general"));
     $pdf->SetFont('Arial', '', 10);
     $pdf->Text(76, 276, utf8_decode("Según resolución:" . $resolucion_director));
     $pdf->Output('oficio_' . $num_control_oficio, 'I');
     #tabla
     /*
     $cabecera=array('Usuario', 'Total asignados', 'Ejecutados');
     $pdf->SetXY(10,30); //Seleccionamos posición
     $pdf->SetFont('Arial','B',10); //Fuente, Negrita, tamaño
      
         foreach($cabecera as $columna){
             //Parámetro con valor 2, cabecera vertical
             $pdf->Cell(50,7, utf8_decode($columna),1, 0,'L');
         }
     
     $pdf->SetXY(10,31);
     $pdf->Ln();//Salto de línea para generar otra fila
     $pdf->Ln();//Salto de línea para generar otra fila
         foreach($cabecera as $fila){
                 //Atención!! el parámetro valor 0, hace que sea horizontal
                 $pdf->Cell(50,7, utf8_decode($fila),1, 0 , '' );
             }
     */
     #llave clase.
 }
开发者ID:vanckruz,项目名称:correspondence,代码行数:97,代码来源:director_general.php

示例9: SetSubject

 /**
  *
  * Wrapper to solve utf-8 issues.
  *
  * @param string $subject
  *
  * @param bool $isUTF8 Defaults to TRUE.
  *
  * @return void
  *
  */
 public function SetSubject($subject, $isUTF8 = TRUE)
 {
     parent::SetSubject($subject, $isUTF8);
 }
开发者ID:CodeSomethingMX,项目名称:barney,代码行数:15,代码来源:EXTENDED.php

示例10: FPDF

            } else { $t_cpe = $t_cpe + 1; }
           }




// mode paysage, a4, etc.
$pdf=new FPDF('P','mm','A4');
$pdf->Open();
$pdf->SetAutoPageBreak(false);

// champs facultatifs
$pdf->SetAuthor('');
$pdf->SetCreator('créé avec Fpdf');
$pdf->SetTitle('Titre');
$pdf->SetSubject('Sujet');

// on charge les 83 gfx...
$pdf->SetMargins(10,10);
for ($i=0; $i<$nb; $i++) {
$pdf->AddPage();
	// information logo
	$L_max_logo='75'; // Longeur maxi du logo
	$H_max_logo='75'; // hauteur maxi du logo
	$logo = '../../images/'.getSettingValue('logo_etab');
	$valeur=redimensionne_logo($logo, $L_max_logo, $H_max_logo);
	$X_logo='23';
	$Y_logo='10';
	$L_logo=$valeur[0];
	$H_logo=$valeur[1];
        //logo
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:lettre_aux_parents.php

示例11:

$consulta2 = "SELECT * FROM CIUDADANO WHERE ID_CIUDADANO= '" . $id_ciudadano . "'";
$stid2 = oci_parse($conex, $consulta2);
if (!$stid2) {
    echo "Error";
}
$r2 = oci_execute($stid2);
if (!$r2) {
    echo "Error";
}
$resultado2 = oci_fetch_assoc($stid2);
$pdf->AddPage();
$pdf->SetTitle("Constancia de denuncia", true);
$pdf->SetFont('Arial', 'B', 14);
$pdf->Text(80, 30, 'Planilla de denuncia');
$pdf->AliasNbPages();
$pdf->SetSubject("Planilla de denuncia");
$pdf->Image('../../public_html/imagenes/banner_institucional.png', 20, 6, 170);
$pdf->Image('../../public_html/imagenes/logoclaro.png', 40, 50, 120);
$pdf->SetXY(10, 100);
$pdf->SetFont('Arial', '', 10);
$pdf->SetXY(20, 40);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetFillColor(18, 4, 155);
$pdf->SetFillColor(35, 65, 129);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(170, 7, utf8_decode('Datos del Trabajador'), 1, 0, 'C', true);
$pdf->Ln();
$pdf->SetXY(20, 47);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFillColor(255, 255, 255, false);
$pdf->Cell(40, 7, utf8_decode('Cédula'), 1, 0, 'C', false);
开发者ID:vanckruz,项目名称:draftReports,代码行数:31,代码来源:generadorpdf.php

示例12: FPDF

 /**
  * Download task list as attachment
  *
  * @access public
  * @param void
  * @return null
  */
 function download_list()
 {
     $task_list = ProjectTaskLists::findById(get_id());
     if (!$task_list instanceof ProjectTaskList) {
         flash_error(lang('task list dnx'));
         $this->redirectTo('task');
     }
     // if
     $this->canGoOn();
     if (!$task_list->canView(logged_user())) {
         flash_error(lang('no access permissions'));
         $this->redirectToReferer(get_url('task'));
     }
     // if
     $output = array_var($_GET, 'output', 'csv');
     $project_name = active_project()->getName();
     $task_list_name = $task_list->getName();
     $task_count = 0;
     if ($output == 'pdf') {
         Env::useLibrary('fpdf');
         $download_name = "{$project_name}-tasks.pdf";
         $download_type = 'application/pdf';
         $pdf = new FPDF("P", "mm");
         $pdf->AddPage();
         $pdf->SetTitle($project_name);
         $pdf->SetCompression(true);
         $pdf->SetCreator('ProjectPier');
         $pdf->SetDisplayMode('fullpage', 'single');
         $pdf->SetSubject(active_project()->getObjectName());
         $pdf->SetFont('Arial', 'B', 16);
         $task_lists = active_project()->getOpenTaskLists();
         $pdf->Cell(0, 10, lang('project') . ': ' . active_project()->getObjectName(), 'B', 0, 'C');
         $pdf->Ln(14);
         $w = array(0 => 12, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140);
         foreach ($task_lists as $task_list) {
             $pdf->SetFont('Arial', 'B', 14);
             $pdf->Write(10, lang('task list') . ': ' . $task_list->getObjectName());
             $pdf->Ln(14);
             $tasks = $task_list->getTasks();
             $pdf->SetFont('Arial', 'I', 14);
             $pdf->SetFillColor(230, 230, 230);
             $pdf->Cell($w[1], 6, '#', 1, 0, 'C', true);
             $pdf->Cell($w[3], 6, lang('status'), 1, 0, 'C', true);
             $pdf->Cell($w[10], 6, lang('info'), 1, 0, 'C', true);
             $pdf->Cell(0, 6, lang(user), 1, 0, 'C', true);
             $pdf->Ln();
             foreach ($tasks as $task) {
                 $line++;
                 if ($task->isCompleted()) {
                     $task_status = lang('completed');
                     $task_status_color_R = 0;
                     $task_status_color_G = 150;
                     $task_status_color_B = 0;
                     $task_completion_info = lang('completed task') . ' : ' . format_date($task->getCompletedOn()) . ' @ ' . format_time($task->getCompletedOn());
                 } else {
                     $task_status = lang('open');
                     $task_status_color_R = 200;
                     $task_status_color_G = 0;
                     $task_status_color_B = 0;
                     $task_completion_info = lang('due date') . ' : ' . lang('not assigned');
                     $task_completion_info_color_R = 200;
                     $task_completion_info_color_G = 0;
                     $task_completion_info_color_B = 0;
                     if ($task->getDueDate()) {
                         $task_completion_info = lang('due date') . ' : ' . format_date($task->getDueDate()) . ' @ ' . format_time($task->getDueDate());
                         $task_completion_info_color_R = 0;
                         $task_completion_info_color_G = 0;
                         $task_completion_info_color_B = 0;
                     }
                 }
                 if ($task->getAssignedTo()) {
                     $task_assignee = $task->getAssignedTo()->getObjectName();
                     $task_assignee_color_R = 0;
                     $task_assignee_color_G = 0;
                     $task_assignee_color_B = 0;
                 } else {
                     $task_assignee = lang('not assigned');
                     $task_assignee_color_R = 200;
                     $task_assignee_color_G = 0;
                     $task_assignee_color_B = 0;
                 }
                 $pdf->SetFillColor(245, 245, 245);
                 $pdf->Cell($w[1], 6, $line, 1, 0, 'C', true);
                 $pdf->SetTextColor($task_status_color_R, $task_status_color_G, $task_status_color_B);
                 $pdf->Cell($w[3], 6, $task_status, 1, 0, 'C', true);
                 $pdf->SetTextColor($task_completion_info_color_R, $task_completion_info_color_G, $task_completion_info_color_B);
                 $pdf->Cell($w[10], 6, $task_completion_info, 1, 0, 'C', true);
                 $pdf->SetTextColor($task_assignee_color_R, $task_assignee_color_G, $task_assignee_color_B);
                 $pdf->Cell(0, 6, $task_assignee, 1, 0, 'C', true);
                 $pdf->SetTextColor(0, 0, 0);
                 $pdf->Ln();
                 $pdf->MultiCell(0, 6, $task->getText(), 1);
                 //$pdf->Ln();
//.........这里部分代码省略.........
开发者ID:federosky,项目名称:ProjectPier-Core,代码行数:101,代码来源:TaskController.class.php


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