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


PHP FPDI::Write方法代码示例

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


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

示例1: listAction

 public function listAction()
 {
     $receipt = new \FPDI();
     // PDFの余白(上左右)を設定
     $receipt->SetMargins(0, 0, 0);
     // ヘッダーの出力を無効化
     $receipt->setPrintHeader(false);
     // フッターの出力を無効化
     $receipt->setPrintFooter(false);
     // フォントを登録
     $fontPathRegular = $this->getLibPath() . '/tcpdf/fonts/migmix-2p-regular.ttf';
     //         $regularFont = $receipt->addTTFfont($fontPathRegular, '', '', 32);
     $font = new TCPDF_FONTS();
     $regularFont = $font->addTTFfont($fontPathRegular);
     $fontPathBold = $this->getLibPath() . '/tcpdf/fonts/migmix-2p-bold.ttf';
     //         $boldFont = $receipt->addTTFfont($fontPathBold, '', '', 32);
     $font = new TCPDF_FONTS();
     $boldFont = $font->addTTFfont($fontPathBold);
     // ページを追加
     $receipt->AddPage();
     // テンプレートを読み込み
     //         $receipt->setSourceFile($this->getLibPath() . '/tcpdf/tpl/receipt.pdf');
     //         $receipt->setSourceFile($this->getLibPath() . '/tcpdf/tpl/template.pdf');
     //         $receipt->setSourceFile($this->getLibPath() . '/tcpdf/tpl/w01_1.pdf');
     $receipt->setSourceFile($this->getLibPath() . '/tcpdf/tpl/senijiten.pdf');
     // 読み込んだPDFの1ページ目のインデックスを取得
     $tplIdx = $receipt->importPage(1);
     // 読み込んだPDFの1ページ目をテンプレートとして使用
     $receipt->useTemplate($tplIdx, null, null, null, null, true);
     // 書き込む文字列のフォントを指定
     $receipt->SetFont($regularFont, '', 11);
     // 書き込む文字列の文字色を指定
     $receipt->SetTextColor(0, 0, 255);
     // X : 42mm / Y : 108mm の位置に
     $receipt->SetXY(59, 248);
     // 文字列を書き込む
     $receipt->Write(0, isset($_POST['name']) ? $_POST['name'] . 'さん' : '名無しさん');
     /*         $response = new Response(
                 // Output関数の第一引数にはファイル名、第二引数には出力タイプを指定する
                 // 今回は文字列で返してほしいので、ファイル名はnull、出力タイプは S = String を選択する
                 $receipt->Output(null, 'S'),
                 200,
                 array('content-type' => 'application/pdf')
             );
     
             // レスポンスヘッダーにContent-Dispositionをセットし、ファイル名をreceipt.pdfに指定
             $response->headers->set('Content-Disposition', 'attachment; filename="receipt.pdf"');
     
             return $response;
      */
     //         $receipt->
     $receipt->output('newpdf.pdf', 'I');
 }
开发者ID:hira-yahoo,项目名称:tcpdf_examples2,代码行数:53,代码来源:example.php

示例2: renderPDF

function renderPDF($id,$mode)
{
	$pdf = new FPDI();
	
	$db_catalogue_pages = new catalogue_pages;
	$db_catalogue_pages->get_one_catalogue_pages($id);
	$db_catalogue_pages->load();
	$template_id = $db_catalogue_pages->get_pag_template();
	
	$template = new catalogue_templates;

	$template->getOne($template_id);
	$template->load();

	$pdf->addPage("Landscape","Letter");

	$db_catalogue_objects = new catalogue_objects;
	$db_catalogue_objects->get_all($id);

	$pdf->SetFont('Arial','',14);

	$pdf->Image("pdftemplates/".$template->get_tem_file().".jpg",0,0);
	while($db_catalogue_objects->load())
	{
		$var = explode("_",$db_catalogue_objects->get_obj_var());
		if($var[0] == "image")
		{
			if(file_exists($db_catalogue_objects->field->obj_image)) $pdf->Image($db_catalogue_objects->field->obj_image,($db_catalogue_objects->field->obj_posx*0.353),($db_catalogue_objects->field->obj_posy*0.353),"50","50");
		}
		$pdf->SetXY($db_catalogue_objects->field->obj_posx*0.353,($db_catalogue_objects->field->obj_posy*0.35) + 60);
		$pdf->Write(5,$db_catalogue_objects->field->obj_text);
	}

	$db_catalogue_objects->close();
	$db_catalogue_pages->close();
	//if($mode=="I") $pdf->Output("page_".$id.".pdf", "I");
	//else $pdf->Output("pages/page_".$id.".pdf", "F");
	$pdf->Output("pages/page_".$id.".pdf", "F");
	
}
开发者ID:highestgoodlikewater,项目名称:scrumban,代码行数:40,代码来源:static.php

示例3:

 // use the imported page
 $pdf->useTemplate($templateId);
 $pdf->SetAutoPageBreak(false);
 //$db = new SQLite3('/home1/columch7/public_html/Columbia.db');
 $db = new SQLite3($columbiaDB);
 $ID = $_GET["ID"];
 $AUTH = $_GET["AUTH"];
 $results = $db->query('SELECT * FROM benton_new_patients where ID =' . $ID . ' and AUTH = ' . $AUTH);
 //$results = $db->query('SELECT * FROM Pasco_new_patients where ID=24');
 $row = $results->fetchArray();
 //print var_dump($row);
 //exit();
 //Name
 $pdf->SetFont('Helvetica');
 $pdf->SetXY(36, 36.5);
 $pdf->Write(10, $row["FIRST_NAME"] . " " . $row["LAST_NAME"]);
 //Phone
 if (strlen($row["PHONE"]) > 4) {
     $pdf->SetXY(150, 36.5);
     $pdf->Write(10, $row["PHONE"]);
 }
 //Cell Phone
 if (strlen($row["CELL_PHONE"]) > 4) {
     $pdf->SetXY(150, 43);
     $pdf->Write(10, $row["CELL_PHONE"]);
 }
 //Street Address
 $pdf->SetXY(25, 43);
 $pdf->Write(10, $row["ADDRESS"]);
 //Email
 $pdf->SetXY(135.5, 49.5);
开发者ID:taylerc,项目名称:www,代码行数:31,代码来源:createPDFBentoncity.php

示例4: FlyerRendering


//.........这里部分代码省略.........
    // Output-Dasteiname zusammenbauen
    $outputFile = $outputPostfix . "-" . $inputFile;
    // initiate FPDI
    $pdf = new FPDI();
    echo "Input: {$inputFile}\n";
    $pageCount = $pdf->setSourceFile($inputFile);
    // Importiere Vorder- und Rueckseite
    $Vorderseite = $pdf->ImportPage(1);
    $Rueckseite = $pdf->ImportPage(2);
    // Seitenabmessungen holen
    $size = $pdf->getTemplateSize($Vorderseite);
    $dokumentBreite = round($size['w'], 2);
    $dokumentHoehe = round($size['h'], 2);
    echo "Dokumenten Breite: {$dokumentBreite} mm\n";
    echo "Dokumenten Hoehe: {$dokumentHoehe} mm\n";
    echo "Anschnitt: {$anschnitt} mm\n";
    // Vorderseite uebernehmen
    // Anfang eines bloeden Hacks wegen des FooterZeilen-Textes.
    // Der Footertext laesst sich nur einfügen, wenn die Seite eine A4 Seite ist.
    // Keine Ahnung warum!
    $pdf->AddPage('L');
    $tplVorderseite = $pdf->importPage(1);
    $pdf->useTemplate($tplVorderseite);
    //Margin ist wegen der Rand-Platzierung des Community Names wichtig.
    $pdf->SetMargins(0, 0, 0);
    // erstmal alle Fonts laden
    echo "Lade Fonts...\n";
    $pdf->AddFont('lato-bold');
    $pdf->AddFont('lato-regular');
    $pdf->AddFont('alternategothic');
    // Rendern Titel Text
    echo "Verarbeite Titel Text...\n";
    $pdf->SetFont('lato-bold');
    $pdf->SetFontSize($kontaktTitelFontSize);
    $pdf->SetTextColor(0, 0, 0);
    //schwarz
    $pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktTitelPositionY + $anschnitt);
    $pdf->Write(0, iconv('UTF-8', 'windows-1252', $kontaktTitelText));
    // Rendern Info Text
    echo "Verarbeite Info Text...\n";
    $pdf->SetTextColor(0, 0, 0);
    //schwarz
    $pdf->SetFontSize($kontaktInfoFontSize);
    foreach ($kontaktInfoTexte as $a) {
        $pdf->SetFont('lato-bold');
        $pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
        $pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[0]));
        $pdf->SetFont('lato-regular');
        $pdf->SetXY($kontaktInfoTextPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
        $pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[1]));
        $kontaktInfoPositionY = $kontaktInfoPositionY + $kontaktInfoZeilenOffsetY;
    }
    // Rendern Community Logo
    echo "Verarbeite Logo...\n";
    $pdf->Image($kontaktLogoDateiName, $kontaktLogoPositionX + $anschnitt, $kontaktLogoPositionY + $anschnitt, $kontaktLogoWidth, 0);
    // Rendern Fusszeilen Text
    echo "Verarbeite Fusszeile...\n";
    $pdf->SetFont('lato-regular');
    $pdf->SetFontSize($kontaktFooterFontSize);
    $pdf->SetTextColor(255, 255, 255);
    //weiss
    $pdf->SetXY($kontaktFooterPositionX + $anschnitt, $kontaktFooterPositionY + $anschnitt);
    $pdf->Cell($kontaktFooterWidth, 0, iconv('UTF-8', 'windows-1252', $kontaktFusszeileText), 0, 0, 'C');
    // Rendern Community Name
    echo "Verarbeite Community Name...\n";
    $pdf->SetFont('alternategothic');
    $pdf->SetFontSize($communityNameFontSize);
    $pdf->SetTextColor(0, 0, 0);
    //schwarz
    $pdf->SetXY($communityNamePositionX + $anschnitt, $communityNamePositionY + $anschnitt);
    $pdf->MultiCell($wRechts, 10, iconv('UTF-8', 'windows-1252', $communityNameText), 0, 'C');
    // Das war's mit dem Editieren
    // Original PDF Rueckseit uebernehmen
    $pdf->AddPage('L', array($dokumentBreite, $dokumentHoehe));
    $tplRueckseite = $pdf->importPage(2);
    $pdf->useTemplate($tplRueckseite);
    // und erstmal abspeichern
    echo "Zwischenspeichern...\n";
    $pdf->Output($outputFile);
    // Hier geht jetzt der Hack wegen der Footerzeile weiter
    // Die gerade abgespeicherte Datei wird erneut eingelesen
    // um dann im Seiten-Format der Ursprungsdatei erneut abgespeichert zu werden.
    // Is' doof, muss aber sein
    $pdf_2 = new FPDI();
    echo "Erneut laden...\n";
    $pageCount = $pdf_2->setSourceFile($outputFile);
    echo "Feinschliff...\n";
    $Vorderseite_2 = $pdf_2->ImportPage(1);
    $Rueckseite_2 = $pdf_2->ImportPage(2);
    $pdf_2->AddPage('L', array($dokumentBreite, $dokumentHoehe));
    $tplForderseite = $pdf_2->importPage(1);
    $pdf_2->useTemplate($tplForderseite);
    $pdf_2->AddPage('L', array($dokumentBreite, $dokumentHoehe));
    $tplRueckseite = $pdf_2->importPage(2);
    $pdf_2->useTemplate($tplRueckseite);
    echo "Output: {$outputFile}\n";
    $pdf_2->Output($outputFile);
    unset($pdf);
    unset($pdf_2);
}
开发者ID:rubo77,项目名称:ffm-freifunk-faltblatt-6-seiten,代码行数:101,代码来源:flyermod.php

示例5: array

 function ten_tardiness_second($second_offenders = array())
 {
     $this->load->library('fpdf');
     define('FPDF_FONTPATH', $this->config->item('fonts_path'));
     $this->load->library('fpdi');
     // initiate FPDI
     $pdf = new FPDI('P', 'mm', 'Legal');
     $pdf->SetLeftMargin(20);
     $pdf->SetRightMargin(15);
     // add a page
     $pdf->AddPage();
     // set the sourcefile
     $pdf->setSourceFile('dtr/template/notice2nd.pdf');
     // select the first page
     $tplIdx = $pdf->importPage(1);
     // use the page we imported
     $pdf->useTemplate($tplIdx);
     $offices = Input::get('offices');
     $office_id = $offices[0];
     $m1 = 'Jul';
     $m2 = 'Aug';
     $m3 = 'Sep';
     $m4 = 'Oct';
     $m5 = 'Nov';
     $m6 = 'Dec';
     $mo1 = '07';
     $mo2 = '08';
     $mo3 = '09';
     $mo4 = '10';
     $mo5 = '11';
     $mo6 = '12';
     $pdf->SetFont('Arial', '', '12');
     $pdf->SetXY(155, 50);
     $pdf->Write(0, date('F d, Y'));
     $pdf->SetX(35);
     $pdf->SetFont('Arial', 'B', '');
     $pdf->Cell(0, 6, "HON. EDWARD S. HAGEDORN ", '', 1, 'L', FALSE);
     $pdf->SetFont('Arial', '', '');
     $pdf->SetX(35);
     $pdf->Cell(0, 6, "City Mayor", '', 1, 'L', FALSE);
     $pdf->SetX(35);
     $pdf->Cell(0, 6, "Puerto Princesa City", '', 1, 'L', FALSE);
     $pdf->Cell(0, 6, "", '', 1, 'C', FALSE);
     $pdf->Cell(0, 6, "Thru: ATTY. SHIRLEY R. DAGANTA", '', 1, 'C', FALSE);
     $pdf->Cell(0, 6, "CG Assistant Dept. Head II", '', 1, 'C', FALSE);
     $pdf->Cell(0, 6, "Assistant City Legal Officer II", '', 1, 'C', FALSE);
     $pdf->Ln(12);
     $pdf->SetX(35);
     $pdf->SetFont('Arial', 'B', '');
     $pdf->Write(0, 'Madam:');
     $pdf->SetFont('Arial', '', '');
     $pdf->Ln(6);
     $pdf->SetX(35);
     $pdf->MultiCell(0, 6, "                Please be informed that despite the first notice issued to him/her as per records in this office, it has been observed that the he/she has continuously incurred the following tardiness and undertime, viz:", 0, 'L', false);
     //$pdf->SetX(35);
     //$pdf->Cell(0,6," $number of your employees has incurred the following, viz:",'',0,'L',false);
     $pdf->SetFont('Arial', 'BI', 10);
     $pdf->Ln(2);
     $pdf->SetFillColor(210, 210, 210);
     //$pdf->SetX(20);
     //header
     $pdf->Cell(50, 8, "Name", 'RLTB', 0, 'C', 1);
     $pdf->Cell(20, 4, $m1, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m2, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m3, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m4, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m5, '1', 0, 'C', 1);
     $pdf->Cell(20, 4, $m6, '1', 1, 'C', 1);
     $pdf->SetFont('Arial', '', 9);
     $pdf->SetFillColor(240, 240, 240);
     $pdf->Cell(50, 4, "", 'RLB', 0, 'C', false);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
     $pdf->Cell(10, 4, "UT", '1', 1, 'C', 1);
     $pdf->SetFillColor(215, 255, 215);
     $year1 = Input::get('year');
     $tardis = $second_offenders;
     if (is_array($tardis)) {
         foreach ($tardis as $tardi) {
             $name = $this->Employee->get_employee_info($tardi, $field = '');
             $late1 = $this->Tardiness->count_late($name['employee_id'], $mo1, $year1, 1, 3);
             $late2 = $this->Tardiness->count_late($name['employee_id'], $mo2, $year1, 1, 3);
             $late3 = $this->Tardiness->count_late($name['employee_id'], $mo3, $year1, 1, 3);
             $late4 = $this->Tardiness->count_late($name['employee_id'], $mo4, $year1, 1, 3);
             $late5 = $this->Tardiness->count_late($name['employee_id'], $mo5, $year1, 1, 3);
             $late6 = $this->Tardiness->count_late($name['employee_id'], $mo6, $year1, 1, 3);
             $under_time1 = $this->Tardiness->count_late($name['employee_id'], $mo1, $year1, 2, 4);
             $under_time2 = $this->Tardiness->count_late($name['employee_id'], $mo2, $year1, 2, 4);
             $under_time3 = $this->Tardiness->count_late($name['employee_id'], $mo3, $year1, 2, 4);
             $under_time4 = $this->Tardiness->count_late($name['employee_id'], $mo4, $year1, 2, 4);
             $under_time5 = $this->Tardiness->count_late($name['employee_id'], $mo5, $year1, 2, 4);
//.........这里部分代码省略.........
开发者ID:billyriantono,项目名称:ihrmis,代码行数:101,代码来源:reports.php

示例6: FPDI

file_put_contents('img.png', $unencodedData);
//Show the image
//echo '<img src="'.$_POST['img_val'].'" />';
$pdf = new FPDI();
$pdf->setSourceFile('TemplateReporte.pdf');
// seteamos la fuente, el estilo y el tamano
$pdf->SetFont('Times', 'B', 10);
// seteamos la posicion inicial
$pdf->SetXY(25, 80);
date_default_timezone_set('America/Bogota');
setlocale(LC_ALL, "es_ES");
$dias = array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sábado");
$meses = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
//agregamos una pagina
$pdf->AddPage();
$pdf->SetFont('Arial');
// seleccionamos la primera pagina del docuemnto importado
$tplIdx = $pdf->importPage(1);
// usamos la pagina importado como template
$pdf->useTemplate($tplIdx);
//seteamos la posicion X
$pdf->SetX(25);
//salto de linea
$pdf->Ln(55.2);
$pdf->SetFontSize(9);
$pdf->Write(0, utf8_decode("                                   " . $dias[date('w')] . " " . date('d') . " de " . $meses[date('n') - 1] . " del " . date('Y')));
$pdf->Image('img.png', 50, 110, 200);
unlink('img.png');
$pdf->Ln(155);
$pdf->Write(0, utf8_decode("                    Relación de costos anuales sobre proyectos ejecutados con éxito."));
$pdf->Output();
开发者ID:soydevcag,项目名称:ProductivityManager,代码行数:31,代码来源:saveReport.php

示例7: explode

	$pdf->Cell(0, 0, "La cuota se calculará mensualmente de acuerdo a la cantidad de trabajadores y a la masa salarial bruta del período de cobertura.");
	$pdf->SetFont("Arial", "B", 9);

	$pdf->Ln(59.8);
	$pdf->Cell(56);
	$pdf->Cell(120, 0, $row2["PR_MAIL"]);

	// Muestro el texto de arriba de las firmas..
	$pdf->SetFont("Arial", "", 9);
	$pdf->Ln(4);
	$texto = explode("\n", "Por medio de la presente ".$row2["RAZON_SOCIAL"]." autoriza a Provincia ART S.A. a entregar a Provincia Seguros S.A. la información sobre la nómina (datos de Empleados, Masa Salarial, C.U.I.L., Nombre, etc.) e información complementaria que a criterio de la aseguradora permita tener un conocimiento de la actividad y del comportamiento del riesgo inherente a la cobertura.");
	for ($i=0; $i<count($texto); $i++) {
		$str = trim($texto[$i]);

		$pdf->WordWrap($str, 188);
		$pdf->Write(4, $str);

		$pdf->Ln(2);
	}

	$pdf->SetX(8);
	$pdf->SetY(250);
	$pdf->Cell(120, 0, "Buenos Aires, ".date("d")." de ".GetMonthName(date("m"))." de ".date("Y"));

	updateFechaImpresion((isset($idFormulario)?$idFormulario:0));
}
else {
	$pdf->AddPage();
	$pdf->SetTextColor(255, 0, 0);
	$pdf->SetFont("Arial", "B", 14);
开发者ID:javierlov,项目名称:FuentesWeb,代码行数:30,代码来源:reporte_responsabilidad_civil.php

示例8: Write

 function Write($h, $txt, $link = '')
 {
     if ($this->CurrentFont['type'] == 'Type0') {
         $this->SJISWrite($h, $txt, $link);
     } else {
         parent::Write($h, $txt, $link);
     }
 }
开发者ID:khrisna,项目名称:eccubedrm,代码行数:8,代码来源:japanese.php

示例9: fopen

<?php

if (isset($_POST['nombre'])) {
    $nombre = $_POST['nombre'];
    $myfile = fopen("data/diplomas.txt", "a");
    date_default_timezone_set('America/Santiago');
    fwrite($myfile, $nombre . "\t" . date('d/m/Y H:i:s', time()) . "\n");
    fclose($myfile);
    $nombre = iconv('UTF-8', 'windows-1252', html_entity_decode($nombre));
    // http://www.setasign.com/products/fpdi/demos/simple-demo/
    require_once 'include/fpdf17/fpdf.php';
    require_once 'include/FPDI-1.5.4/fpdi.php';
    $pdf = new FPDI();
    $pdf->setSourceFile("media/felicitaciones.pdf");
    $tplIdx = $pdf->importPage(1);
    $size = $pdf->getTemplateSize($tplIdx);
    $pdf->AddPage('L', array($size['w'], $size['h']));
    $pdf->useTemplate($tplIdx);
    //$pdf->useTemplate($tplIdx, 10, 10, 100);
    $pdf->SetFont('Helvetica', 'B', 30);
    $pdf->SetTextColor(0, 0, 0);
    $mid_x = $size['w'] / 2;
    $str_w = $pdf->GetStringWidth($nombre) / 2;
    $pos_x = $mid_x - $str_w;
    $pdf->SetXY($pos_x, 65);
    $pdf->Write(0, $nombre);
    $pdf->Output();
} else {
    header("Location: index.php");
    die;
}
开发者ID:Robin40,项目名称:hourofcodechile,代码行数:31,代码来源:crear_diploma.php

示例10: trim

 function decrypt_text($value, $key1, $key2)
 {
     if (!$value || !$key1 || !$key2) {
         return false;
     }
     $crypttext = base64_decode($value);
     $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key1, $crypttext, MCRYPT_MODE_ECB, $key2);
     return trim($decrypttext);
 }
 $row = $results->fetchArray();
 //print var_dump($row);
 //exit();
 //Name
 $pdf->SetFont('Helvetica');
 $pdf->SetXY(30, 42.1);
 $pdf->Write(10, $row["FIRST_NAME"] . " " . $row["LAST_NAME"]);
 //Street Address
 $pdf->SetXY(22, 49.5);
 $pdf->Write(10, $row["ADDRESS"]);
 //Email
 $pdf->SetXY(130, 61);
 $pdf->Write(10, $row["EMAIL"]);
 //City
 $pdf->SetXY(15, 61.5);
 $pdf->Write(10, $row["CITY"]);
 //State
 $pdf->SetXY(72.5, 61.5);
 $pdf->Write(10, $row["STATE"]);
 //Zip
 $pdf->SetXY(100, 61.5);
 $pdf->Write(10, $row["ZIP"]);
开发者ID:taylerc,项目名称:www,代码行数:31,代码来源:createPDFMeridian.php

示例11: FPDI

        $row = mysql_fetch_assoc($sql);
    }
}
$pdf = new FPDI();
$pageCount = $pdf->setSourceFile("img/dogovir2015.pdf");
$pageNo = 1;
$templateId = $pdf->importPage($pageNo);
$size = $pdf->getTemplateSize($templateId);
$pdf->AddPage('P', array($size['w'], $size['h']));
$pdf->useTemplate($templateId);
$pdf->AddFont('Times', '', 'times.php');
$pdf->SetFont('Times', '', 10);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFontSize(11);
$pdf->SetXY(20, 40);
$pdf->Write(5, $row['lastname'] . " " . $row['firstname'] . " " . $row['patronymic']);
$pdf->SetXY(20, 47);
$pdf->Write(5, $row['pasp_serial'] . " " . $row['pasp_number'] . " виданий " . $row['pasp_issue'] . " " . date("d.m.Y", $row['pasp_date']));
$pdf->SetXY(20, 80);
$pdf->Write(5, $row['lastname'] . " " . $row['firstname'] . " " . $row['patronymic']);
$pdf->SetXY(35, 87);
if ($row['study_type'] == "Денна") {
    $pdf->Write(5, "денною");
}
if ($row['study_type'] == "Заочна") {
    $pdf->Write(5, "заочною");
}
$pdf->SetXY(160, 87);
if ($row['type'] == "mag") {
    $pdf->Write(5, "магістр");
}
开发者ID:AlexSlovinskiy,项目名称:magistr.zu.edu.ua,代码行数:31,代码来源:PatternGenPact.php

示例12: trim

 function decrypt_text($value, $key1, $key2)
 {
     if (!$value || !$key1 || !$key2) {
         return false;
     }
     $crypttext = base64_decode($value);
     $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key1, $crypttext, MCRYPT_MODE_ECB, $key2);
     return trim($decrypttext);
 }
 $row = $results->fetchArray();
 //print var_dump($row);
 //exit();
 //Name
 $pdf->SetFont('Helvetica');
 $pdf->SetXY(37, 38);
 $pdf->Write(10, $row["FIRST_NAME"] . " " . $row["LAST_NAME"]);
 //Phone
 $pdf->SetXY(137, 38);
 $pdf->Write(10, $row["PHONE"]);
 //Street Address
 $pdf->SetXY(26, 44.5);
 $pdf->Write(10, $row["ADDRESS"]);
 //Cell Phone
 $pdf->SetXY(139, 45);
 $pdf->Write(10, $row["CELL_PHONE"]);
 //City
 $pdf->SetXY(20, 51.5);
 $pdf->Write(10, $row["CITY"]);
 //State
 $pdf->SetXY(108, 51.5);
 $pdf->Write(10, $row["STATE"]);
开发者ID:taylerc,项目名称:www,代码行数:31,代码来源:createPDFrichland.php

示例13: download_tag

 public function download_tag()
 {
     $r1 = Input::has('r1') ? Input::get('r1') : 'Mr Sam Sample';
     $r2 = Input::has('r2') ? Input::get('r2') : 'Sample Street';
     $r3 = Input::has('r3') ? Input::get('r3') : 'Sampletown VIC 3000';
     $r4 = Input::has('r4') ? Input::get('r4') : 'phone +61 414 141 414';
     if ($user = Auth::user()) {
         $member = Member::where('user_id', '=', $user->id)->first();
         $r1 = $member->firstname . ' ' . $member->lastname;
         $r2 = $member->address;
         $r3 = $member->suburb . ' ' . $member->state . ' ' . $member->postcode;
         $r4 = 'phone ' . $member->phone;
     }
     $pdf = new FPDI('L');
     $pdf->setPrintHeader(false);
     $pdf->setPrintFooter(false);
     $pdf->AddPage();
     $pdf->setSourceFile(realpath(dirname(__FILE__)) . '/../../public/assets/pdf/luggage_tags.pdf');
     $pdf->SetTextColor(0, 0, 0);
     $tplIdx = $pdf->importPage(1);
     $pdf->useTemplate($tplIdx);
     $pdf->SetFont('museosansrounded1000');
     $pdf->SetXY(121, 40);
     $pdf->Write(20, $r1);
     $pdf->SetXY(121, 45);
     $pdf->Write(20, $r2);
     $pdf->SetXY(121, 50);
     $pdf->Write(20, $r3);
     $pdf->SetXY(121, 55);
     $pdf->Write(20, $r4);
     $pdf->Output('luggage-tag.pdf');
 }
开发者ID:zehash,项目名称:ff,代码行数:32,代码来源:PdfController.php

示例14: FPDI

     $pdf = new FPDI();
     // add a page
     $pdf->AddPage();
     // set the source file
     $pdf->setSourceFile("../image/patron_image/certificat_sanitaire.pdf");
     // import page 1
     $tplIdx = $pdf->importPage(1);
     // use the imported page and place it at point 10,10 with a width of 100 mm
     $pdf->useTemplate($tplIdx, 0, 0, 0);
     // now write some text above the imported page
     $pdf->SetFont('Helvetica');
     $pdf->SetFontSize(12);
     $pdf->SetTextColor(0, 0, 0);
     foreach ($array_sani as $row) {
         $pdf->SetXY($row['posx'], $row['posy']);
         $pdf->Write(0, requetemysql::gestion_string_maj(remplissage_formulaire($row, $info_veto, $info_client, $info_animal)));
     }
     $pdf->Output('../sauvegarde/animaux/' . $_POST['animal_id'] . '/certif_sanitaire_' . $variable . '.pdf', F);
     echo json_encode($variable);
 } elseif ($_GET['action'] == 'modif_lot') {
     $sql = "UPDATE medicament set lot=:lot WHERE nom=:nom and permission=:permission LIMIT 1";
     $st2 = $db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
     $st2->execute(array(':lot' => $_POST['lot'], ':nom' => $_POST['nom'], ':permission' => $_SESSION['login']));
     $st2->closeCursor();
     echo json_encode("ok");
 } elseif ($_GET['action'] == 'medic') {
     $medicament = requetemysql::recup_medic(array('nom' => $_GET['recherche']));
     if (empty($medicament)) {
         //throw new Exception("Aucun medicament dans la base de donnee !");
     }
     echo $medicament;
开发者ID:astrolabb,项目名称:aerogard3.2,代码行数:31,代码来源:nouvelleconsultation.php

示例15: setlocale

 setlocale(LC_ALL, "es_ES");
 $dias = array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sábado");
 $meses = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
 //agregamos una pagina
 $pdf->AddPage();
 $pdf->SetFont('Arial');
 // seleccionamos la primera pagina del docuemnto importado
 $tplIdx = $pdf->importPage(1);
 // usamos la pagina importado como template
 $pdf->useTemplate($tplIdx);
 //seteamos la posicion X
 $pdf->SetX(25);
 //salto de linea
 $pdf->Ln(55.2);
 $pdf->SetFontSize(9);
 $pdf->Write(0, utf8_decode("                                   " . $dias[date('w')] . " " . date('d') . " de " . $meses[date('n') - 1] . " del " . date('Y')));
 $pdf->Ln(10);
 $pdf->SetFontSize(15);
 $pdf->write(15, '                                                    ' . $proBasic["nombreProyecto"]);
 $pdf->Ln(10);
 $pdf->SetFontSize(12);
 $pdf->write(15, '                                                               ' . utf8_decode($proBasic["nombreProyecto"]));
 $pdf->Ln(6);
 $pdf->write(15, '                                                               ' . $proBasic["fechaInicio"]);
 $pdf->Ln(6);
 $pdf->write(15, '                                                               ' . $proBasic["fechaFin"]);
 $pdf->Ln(6);
 $pdf->write(15, '                                                               ' . utf8_decode($proBasic["estadoProyecto"]));
 $pdf->Ln(6);
 $pdf->write(15, '                                                               ' . $proBasic["ejecutado"] . '%');
 $pdf->Ln(5);
开发者ID:soydevcag,项目名称:ProductivityManager,代码行数:31,代码来源:ControladorPDF.php


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