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


PHP FPDI::SetXY方法代码示例

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


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

示例1: generate_mitgliedsbescheinigung

function generate_mitgliedsbescheinigung($titleAndName, $strasse, $plz, $ort, $land, $jahr, $vorstand, $datum)
{
    // initiate FPDI
    $pdf = new FPDI();
    // add a page
    $pdf->AddPage();
    // set the source file
    $pdf->setSourceFile(HOME_DIRECTORY . 'alumpiHP_libraries/Mitgliedsbestaetigung_blank.pdf');
    // import page 1
    $tplIdx = $pdf->importPage(1);
    // use the imported page and place it at position 0,0 with a width of 210 mm (full page)
    $pdf->useTemplate($tplIdx, 0, 0, 210);
    // add the font DejaVu
    $pdf->AddFont('DejaVuSans', '', 'DejaVuSans.ttf', true);
    $pdf->AddFont('DejaVuSans-Bold', '', 'DejaVuSans-Bold.ttf', true);
    // text settings
    $pdf->SetTextColor(0, 0, 0);
    // add address of the member
    $addressString = $titleAndName . "\n";
    $addressString .= $strasse . "\n";
    $addressString .= $plz . " " . $ort . "\n";
    $addressString .= $land;
    $pdf->SetFont('DejaVuSans');
    $pdf->SetFontSize(12);
    $pdf->SetXY(20, 23);
    $pdf->Multicell(80, 6, $addressString);
    //add heading
    $headingString = "Mitgliedsbescheinigung " . $jahr;
    $pdf->SetFont('DejaVuSans-Bold');
    $pdf->SetFontSize(16);
    $pdf->SetXY(20, 80);
    $pdf->Multicell(170, 6, $headingString);
    // add main text
    $textString = "Hiermit wird bestätigt, dass " . $titleAndName . " im Kalenderjahr " . $jahr;
    $textString .= " ordentliches Mitglied des Absolventen- und Förderverein MPI Uni Bayreuth e.V. (aluMPI) ist.\n";
    $textString .= "\n";
    $pdf->SetFont('DejaVuSans');
    $pdf->SetFontSize(12);
    $pdf->SetXY(20, 100);
    $pdf->Multicell(170, 6, $textString);
    // add signature text
    $signatureString = "Absolventen- und Förderverein MPI Uni Bayreuth e.V.\n";
    $signatureString .= "1. Vorstand: " . $vorstand . "\n";
    $pdf->SetXY(20, 140);
    $pdf->Multicell(170, 6, $signatureString);
    // add signature
    $pdf->Image(HOME_DIRECTORY . 'alumpiHP_libraries/unterschrift_krinninger.png', 20, 155, 50);
    // add place and date
    $dateString = "Bayreuth, " . $datum;
    $pdf->SetXY(20, 180);
    $pdf->Multicell(170, 6, $dateString);
    ob_clean();
    $pdf->Output();
}
开发者ID:Beztix,项目名称:alumpi,代码行数:54,代码来源:generate_mitgliedsbescheinigung.php

示例2: 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

示例3: 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

示例4: execute

 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $id = $input->getArgument('id');
     $pdffile = $input->getArgument('pdf');
     $em = $this->getContainer()->get('doctrine');
     $tab = $this->csv($pdffile);
     $template = $em->getRepository('PrintBundle:Template')->find($id);
     $path = $this->getContainer()->get('kernel')->getRootDir() . '/../web/uploads/pdf/' . $template->getPdffile();
     $width = $template->getWidth();
     $height = $template->getHeight();
     $orientation = $height > $width ? 'P' : 'L';
     $custom_layout = array($width, $height);
     $i = 1;
     foreach ($tab as $key => $value) {
         $pdf = new \FPDI($orientation, 'mm', $custom_layout, true, 'UTF-8', false);
         $pdf->setPageOrientation($orientation);
         $pdf->SetMargins(PDF_MARGIN_LEFT, 40, PDF_MARGIN_RIGHT);
         $pdf->SetAutoPageBreak(true, 40);
         $pdf->setFontSubsetting(false);
         // add a page
         $pdf->AddPage($orientation);
         $pdf->setSourceFile($path);
         $_tplIdx = $pdf->importPage(1);
         $size = $pdf->useTemplate($_tplIdx, 0, 0, $width, true);
         foreach ($template->getChildactivity() as $opt) {
             $pdf->SetXY($opt->getX(), $opt->getY());
             $pdf->SetFont($opt->getFont(), '', $opt->getFontsize() * 2);
             // echo $opt->getFontsize()."\n";
             $pdf->Cell($opt->getWidth(), $opt->getHeight(), $value[$opt->getName()]);
         }
         //$pdf->Cell(0, $size['h'], 'TCPDF and FPDI');
         // echo $template->getId();
         $pdf->Output($this->getContainer()->get('kernel')->getRootDir() . '/../web/folder/pdf' . $template->getId() . "-{$i}.pdf", 'F');
         $i++;
     }
 }
开发者ID:saliih,项目名称:yasmine-print,代码行数:36,代码来源:PrintCommand.php

示例5: FPDI

 function back_id($results)
 {
     $this->load->helper('settings');
     //print preview of MR
     $this->load->library('fpdf');
     $this->load->library('fpdi');
     // initiate FPDI
     $pdf = new FPDI('L');
     // add a page
     $pdf->AddPage();
     // set the sourcefile
     $pagecount = $pdf->setSourceFile('pdf-report/id/back-id.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);
     // now write some text above the imported page
     $pdf->SetTextColor(0, 0, 0);
     $pdf->SetFont('Arial', '', 7);
     $n = 1;
     foreach ($results as $result) {
         $s = new Personal_m();
         $row = $s->get_by_employee_id($result->employee_id);
         //======================== START Column 1 | Right to Left ==============================
         if ($n == 11) {
             //add new page
             $pdf->addPage();
             for ($n = 1; $n <= 1; $n++) {
                 $tplidx = $pdf->ImportPage(1);
                 $pdf->useTemplate($tplIdx);
                 //, 1, 1, 210
             }
             $n = $n - 1;
         }
         $bday = $row->birth_date;
         $address = $row->res_address;
         $blood_type = '"' . $row->blood_type . '"';
         $gsis = $row->gsis;
         $pagibig = $row->pagibig;
         $philhealth = $row->philhealth;
         $tin = $row->tin;
         $emergency = '';
         $contact = $row->cp;
         //----------------------------- Row 1 ----------------------------------
         ///Birthday
         if ($n == 1) {
             //Birthday
             if ($bday != '0000-00-00') {
                 $pdf->SetXY(247, 23);
                 $pdf->Cell(50, 0, date('F d, Y', strtotime(date('F d, Y', strtotime($bday)))), '0', 0, 'C', false);
             }
             //Address
             $pdf->SetXY(257, 15);
             $addr = splitstroverflow(ucwords(strtolower(utf8_decode($address))), 28);
             $pdf->Cell(30, 0, $addr[0], '0', 0, 'C', false);
             //display text overflow
             if ($addr[1]) {
                 $pdf->Ln(2.5);
                 $pdf->SetX(257);
                 $pdf->Cell(30, 0, $addr[1], '0', 0, 'C', false);
             }
             if ($addr[2]) {
                 $pdf->Ln(2.5);
                 $pdf->SetX(257);
                 $pdf->Cell(30, 0, $addr[2], '0', 0, 'C', false);
             }
             if ($addr[3]) {
                 $pdf->Ln(2.5);
                 $pdf->SetX(257);
                 $pdf->Cell(30, 0, $addr[3], '0', 0, 'C', false);
             }
             //Blood Type
             $pdf->SetXY(247, 28.3);
             $pdf->Cell(50, 0, strtoupper($blood_type), '0', 0, 'C', false);
             //GSIS
             $pdf->SetXY(247, 33);
             $pdf->Cell(50, 0, strtoupper($gsis), '0', 0, 'C', false);
             //PAGIBIG
             $pdf->SetXY(247, 38);
             $pdf->Cell(50, 0, strtoupper($pagibig), '0', 0, 'C', false);
             //PHILHEALTH
             $pdf->SetXY(247, 43.5);
             $pdf->Cell(50, 0, strtoupper($philhealth), '0', 0, 'C', false);
             //PHILHEALTH
             $pdf->SetXY(247, 48.5);
             $pdf->Cell(50, 0, strtoupper($tin), '0', 0, 'C', false);
             //in case of emergency
             $pdf->SetXY(235, 75.5);
             $pdf->Cell(60, 0, strtoupper($emergency), '0', 0, 'C', false);
             //CP No.
             $pdf->SetXY(250, 78);
             $cpno = splitstroverflow($contact, 13);
             $pdf->Cell(30, 0, $cpno[0], '0', 0, 'C', false);
             if ($cpno[1]) {
                 $pdf->Ln(3);
                 $pdf->SetX(250);
                 $pdf->Cell(30, 0, $cpno[1], '0', 0, 'C', false);
             }
         }
         //----------------------------- Row 2 ----------------------------------
//.........这里部分代码省略.........
开发者ID:billyriantono,项目名称:ihrmis,代码行数:101,代码来源:id_preview.php

示例6: executeBatchPrintBadge

 public function executeBatchPrintBadge(sfWebRequest $request)
 {
     $ids = $request->getParameter('ids');
     // initiate FPDI
     $pdf = new FPDI('P', 'pt');
     // set the sourcefile
     $pdf->setSourceFile(sfConfig::get('sf_upload_dir') . '/badges/ID_new.pdf');
     foreach ($ids as $id) {
         $this->employee = EmployeePeer::retrieveByPk($id);
         // import page 1
         $tplIdx = $pdf->importPage(1);
         // add a new page based on size of the badge
         $s = $pdf->getTemplatesize($tplIdx);
         $pdf->AddPage('P', array($s['w'], $s['h']));
         $pdf->useTemplate($tplIdx);
         $pdf->setMargins(0, 0, 0, 0);
         $pdf->SetAutoPageBreak(false);
         if ($this->employee->getPicture()) {
             $pdf->Image(sfConfig::get('sf_upload_dir') . '/' . sfConfig::get('app_employee_images_dir') . '/' . $this->employee->getPicture(), 29.5, 25.5, 60.3, 74.3);
         } else {
             $pdf->Image(sfConfig::get('sf_upload_dir') . '/badges/picture_missing.jpg', 29.5, 25.5, 60.3, 74.3);
         }
         // now write some text above the imported page
         $pdf->SetFont('freesans', 'B', 12);
         $pdf->SetTextColor(82, 78, 134);
         $pdf->SetXY(22, 110);
         $pdf->Cell(0, 12, $this->employee->getFullName());
         $pdf->Ln();
         $pdf->SetX(22);
         $pdf->SetFont('freesans', 'BI', 10);
         $pdf->Cell(0, 14, $this->employee->getJob());
         $pdf->SetDisplayMode('real');
     }
     return $pdf->Output('newpdf.pdf', 'D');
 }
开发者ID:anvaya,项目名称:nckids,代码行数:35,代码来源:actions.class.php

示例7: substr

require_once '../modelo/utilidades/Fpdf/fpdf.php';
require_once '../modelo/utilidades/Fpdi/fpdi.php';
//Get the base-64 string from data
$filteredData = substr($_POST['img_val'], strpos($_POST['img_val'], ",") + 1);
//Decode the string
$unencodedData = base64_decode($filteredData);
//Save the image
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);
开发者ID:soydevcag,项目名称:ProductivityManager,代码行数:31,代码来源:saveReport.php

示例8: trim

 {
     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);
 }
 //loads the data from the table into the array $row
 $row = $results->fetchArray();
 //print var_dump($row);
 //exit();
 //instructions for where and how to place each piece of information on the pdf form
 //Name
 $pdf->SetFont('Arial');
 $pdf->SetXY(36, 35.5);
 $pdf->Write(10, $row["FIRST_NAME"] . " " . $row["LAST_NAME"]);
 //Phone
 $pdf->SetXY(147, 35.5);
 $pdf->Write(10, $row["HOME_PHONE"]);
 //Cell Phone
 if (strlen($row["CELL_PHONE"]) > 3) {
     $pdf->SetXY(142, 42.2);
     $pdf->Write(10, $row["CELL_PHONE"]);
 }
 //Street Address
 $pdf->SetXY(27, 42.2);
 $pdf->Write(10, $row["ADDRESS"]);
 //Email
 $pdf->SetXY(136, 48.5);
 $pdf->Write(10, $row["EMAIL"]);
开发者ID:taylerc,项目名称:www,代码行数:31,代码来源:createPDFmoseslake.php

示例9: pdfImg

 public function pdfImg($file)
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . 'tyj_oa/Public/fpdf/fpdf.php';
     require_once $_SERVER['DOCUMENT_ROOT'] . 'tyj_oa/Public/fpdi/fpdi.php';
     $pdf = new FPDI();
     $pageCount = $pdf->setSourceFile($file);
     for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) {
         $templateId = $pdf->importPage($pageNo);
         $size = $pdf->getTemplateSize($templateId);
         if ($size['w'] > $size['h']) {
             $pdf->AddPage('L', array($size['w'], $size['h']));
         } else {
             $pdf->AddPage('P', array($size['w'], $size['h']));
         }
         if ($pageNo == $pageCount) {
             $img = $_SERVER['DOCUMENT_ROOT'] . get_save_url() . D('user')->where('id = ' . get_user_id())->getField('pic_yin');
             $pdf->Image($img, 150, 250, 0, 20);
         }
         $pdf->useTemplate($templateId);
         $pdf->SetFont('Helvetica');
         $pdf->SetXY(5, 5);
     }
     $pdf->Output($file);
 }
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:24,代码来源:FlowModel.class.php

示例10: FPDI

 }
 $pdf = new FPDI();
 if ($user->getPrivilege() <= 10) {
     $source = "docs/certificatelead.pdf";
 } else {
     $source = "docs/certificate.pdf";
 }
 $pagecount = $pdf->setSourceFile($source);
 $tplidx = $pdf->importPage(1);
 $pdf->addPage('L');
 $pdf->useTemplate($tplidx, 0, 0, 0);
 $date = date('jS F Y');
 $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true);
 $pdf->SetFont('DejaVu', '', 30);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->SetXY(0, 95);
 $pdf->Cell(297, 15, $name, 0, 0, 'C', 0);
 $pdf->SetFont('Arial', '', 18);
 $pdf->SetXY(170, 160);
 $pdf->Write(0, $date);
 $attachment = $pdf->output('Certificate.pdf', 'S');
 header('Pragma: public');
 header('Expires: -1');
 header('Content-Transfer-Encoding: binary');
 header('Content-Type: application/pdf');
 header('Content-Disposition: attachment;filename="ISOS%20Certificate.pdf"');
 header('Cache-Control: max-age=0');
 // output the file
 echo $attachment;
 exit;
 break;
开发者ID:uhtoff,项目名称:eCRF,代码行数:31,代码来源:process.php

示例11: define

 function cto_apps($id = '')
 {
     $c = CompensatoryTimeoff::find($id);
     $name = $this->Employee->get_employee_info($c->employee_id);
     $office_name = $this->Office->get_office_name($name['office_id']);
     $this->load->library('fpdf');
     define('FPDF_FONTPATH', $this->config->item('fonts_path'));
     $this->load->library('fpdi');
     $pdf = new FPDI('P', 'mm', 'Legal');
     // add a page
     $pdf->AddPage();
     // set the sourcefile
     $pdf->setSourceFile('dtr/template/app_for_offset.pdf');
     // select the first page
     $tplIdx = $pdf->importPage(1);
     // use the page we imported
     $pdf->useTemplate($tplIdx);
     // set font, font style, font size.
     $pdf->SetFont('Arial', 'B', 12);
     // set initial placement
     $pdf->SetXY(158, 10.5);
     $pdf->Write(0, 'Tracking no: ' . $id);
     $pdf->Ln(9);
     $pdf->SetX(158);
     $pdf->Ln(20);
     // go to 25 X (indent)
     $pdf->SetX(12);
     $this->Office->fields = array('office_code');
     $office = $this->Office->get_office_info($name['office_id']);
     // write office
     $pdf->SetFont('Arial', 'B', 10);
     $pdf->Write(0, $office['office_name']);
     $pdf->SetFont('Arial', 'B', 12);
     //lname
     $pdf->SetX(99);
     $pdf->Write(0, $name['lname']);
     //fname
     $pdf->SetX(145);
     $pdf->Write(0, $name['fname']);
     //mname
     $pdf->SetX(187);
     $pdf->Write(0, $name['mname'][0] . '.');
     $pdf->Ln(10);
     //date of file
     $pdf->SetX(20);
     $pdf->Write(0, $c->date_file);
     //position
     $pdf->SetFont('Arial', 'B', 10);
     $pdf->SetX(63);
     $pdf->Write(0, $name['position']);
     $pdf->SetFont('Arial', 'B', 12);
     // We need to check what salary grade the office use
     if ($office['salary_grade_type'] == 'hospital') {
         $this->Salary_grade->salary_grade_type = 'hospital';
     }
     //monthly salary
     $pdf->SetX(140);
     $pdf->Write(0, 'P ' . number_format($this->Salary_grade->get_monthly_salary($name['salary_grade'], $name['step']), 2));
     $days = 'day';
     if ($c->days > 1) {
         $days = 'days';
     }
     $pdf->Ln(13);
     $pdf->SetX(30);
     $pdf->Write(0, $c->days . ' ' . $days);
     $pdf->SetX(140);
     //$pdf->Write(0, 'daily rate here');
     $pdf->Ln(13);
     $pdf->SetX(50);
     $pdf->Write(0, $this->Helps->get_month_name($c->month) . ' ' . $c->dates . ', ' . $c->year);
     $cto_balances_as_of = date("F d, Y", strtotime($c->date_file . "-1 day"));
     $pdf->SetXY(30, 106);
     $pdf->Write(0, $cto_balances_as_of);
     // Compute balances
     // (balance + earn) - spent
     $cto = CompensatoryTimeoff::getBalance($c->employee_id);
     //$balance = $cto->days;
     $balance = $cto;
     $cto = CompensatoryTimeoff::getEarnedSpent($c->employee_id);
     //$earn = $cto->days;
     $earn = $cto;
     $cto = CompensatoryTimeoff::getEarnedSpent($c->employee_id, 'spent');
     //$spent = $cto->days;
     $spent = $cto;
     $total_balance = $balance + $earn - $spent;
     $pdf->SetXY(35, 116);
     $pdf->Write(0, $total_balance);
     $pdf->SetX(87);
     $pdf->Write(0, '');
     // hours here
     // Get office head
     $office = $this->Office->get_office_info($name['office_id']);
     // If detailed
     if ($name['detailed_office_id'] != 0) {
         $detailed_office = $this->Office->get_office_info($name['detailed_office_id']);
         $office['office_head'] = $detailed_office['office_head'];
         $office['position'] = $detailed_office['position'];
     }
     // If Employee is Department head
     $o = new Office_m();
//.........这里部分代码省略.........
开发者ID:billyriantono,项目名称:ihrmis,代码行数:101,代码来源:reports.php

示例12: write_instruction


//.........这里部分代码省略.........
    } else {
        $ing15 = $bul . " " . $data[$rec_ind][26];
    }
    if (empty($data[$rec_ind][27])) {
        $ing16 = "";
    } else {
        $ing16 = $bul . " " . $data[$rec_ind][27];
    }
    if (empty($data[$rec_ind][28])) {
        $ing17 = "";
    } else {
        $ing17 = $bul . " " . $data[$rec_ind][28];
    }
    if (empty($data[$rec_ind][29])) {
        $ing18 = "";
    } else {
        $ing18 = $bul . " " . $data[$rec_ind][29];
    }
    // Initiate FPDI & FPDF
    $pdf = new FPDI();
    $pdf->setSourceFile("extract_template.pdf");
    // Create page 1 & Read Template Page 1
    $pdf->AddPage('P', 'Letter');
    $tmp = $pdf->importPage(1);
    $pdf->useTemplate($tmp, 0, 0);
    // Declare Fonts
    $pdf->AddFont('Kenyancoffee', '', 'Kenyancoffeerg.php');
    $pdf->AddFont('Roboto', '', 'Roboto-Regular.php');
    $pdf->AddFont('Roboto', 'L', 'Roboto-Light.php');
    $pdf->AddFont('Roboto', 'B', 'Roboto-Bold.php');
    // Write Dynamic Data - Header
    $pdf->SetFont('Kenyancoffee', '', 23);
    $pdf->SetTextColor(229, 80, 84);
    $pdf->SetXY(57.3, 19);
    $pdf->Cell(0, 0, $recipe);
    $pdf->SetFont('Roboto', 'L', 9.9);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetXY(57.3, 25.5);
    $pdf->Cell(0, 0, $style);
    $pdf->SetFont('Roboto', 'L', 9.9);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetXY(65.2, 36.2);
    $pdf->Cell(0, 0, $og);
    $pdf->SetFont('Roboto', 'L', 9.9);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetXY(85.2, 36.2);
    $pdf->Cell(0, 0, $fg);
    $pdf->SetFont('Roboto', 'L', 9.9);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetXY(108.5, 36.2);
    $pdf->Cell(0, 0, $abv);
    // Write Dynamic Data - Ingredients
    $pdf->SetFont('Roboto', 'B', 7.5);
    $pdf->SetTextColor(255, 255, 255);
    $pdf->SetXY(5.3, 156.5);
    $pdf->Cell(0, 0, $ing1);
    $pdf->SetFont('Roboto', 'B', 7.5);
    $pdf->SetTextColor(255, 255, 255);
    $pdf->SetXY(5.3, 161.5);
    $pdf->Cell(0, 0, $ing2);
    $pdf->SetFont('Roboto', 'B', 7.5);
    $pdf->SetTextColor(255, 255, 255);
    $pdf->SetXY(5.3, 166.5);
    $pdf->Cell(0, 0, $ing3);
    $pdf->SetFont('Roboto', 'B', 7.5);
    $pdf->SetTextColor(255, 255, 255);
开发者ID:ttanton,项目名称:dynamic-recipes,代码行数:67,代码来源:instr_ex.php

示例13: ON

<?php

if (@$_POST['id_certificado']) {
    global $wpdb;
    $certificado = $wpdb->get_row($wpdb->prepare("SELECT c.id as id, c.nome as nome, e.id as evento_id FROM participantes c INNER JOIN " . "evento e ON (e.id = c.evento_id) WHERE c.id=%d", $_POST['id_certificado']));
    require get_stylesheet_directory() . '/inc/fpdf/fpdf.php';
    require get_stylesheet_directory() . '/inc/fpdf/fpdi.php';
    $pdf = new FPDI('L', 'mm', "A4");
    $pdf->setSourceFile(get_stylesheet_directory() . "/certificados/evento_" . $certificado->evento_id . ".pdf");
    $pdf->AddPage('L');
    $tplidx = $pdf->importPage(1, '/MediaBox');
    $pdf->useTemplate($tplidx, 0, 0, 297, 210, true);
    $pdf->SetXY(10, 85);
    //Informamos a fonte, seu estilo e seu tamanho
    $pdf->SetFont('Arial', '', 28);
    $pdf->Cell(0, 8, iconv("UTF-8", "CP1252", $certificado->nome), 0, 1, 'C');
    $arquivo_certificado = preg_replace('/[^A-Za-z0-9\\-]/', '', str_replace(" ", "_", $certificado->nome)) . ".pdf";
    $pdf->Output($arquivo_certificado, 'D');
    $wpdb->query($wpdb->prepare("UPDATE participantes SET data_geracao = CURRENT_TIMESTAMP WHERE id=%d", $_POST['id_certificado']));
}
get_header();
?>

<section>
	<div class="container mt-lg mb-lg">
		<?php 
if (have_posts()) {
    ?>
			<?php 
    while (have_posts()) {
        the_post();
开发者ID:kailIII,项目名称:pensandoodireito-tema,代码行数:31,代码来源:page-certificados.php

示例14:

// $pdf->setSourceFile('blank/bso3.pdf');
// // Указываем номер импортируемой страницы
// $tplIdx = $pdf->importPage(1);
// //указываем размер страницы
// //$pdf->useTemplate($tplIdx, 0, 0, 210, 297, true);
// $pdf->useTemplate($tplIdx, 0, 0, 210, 297, true);
//Ставим поля по нулям
$pdf->SetMargins(0, 0, 0, 0);
$pdf->SetAutoPageBreak(false);
//указываем шрифт и размер
$pdf->SetFont('Arial-BoldMT', '', '13');
//указываем цвет текста
$pdf->SetTextColor(0, 0, 0);
////////////////////////////////////////////////////////Добавляем данные в полис//////////////////////////////
//Время начала действия договора
$pdf->SetXY(120.8, 42.5);
$pdf->Write(0, $contract_data['start_time'][0]);
$pdf->SetXY(125.8, 42.5);
$pdf->Write(0, $contract_data['start_time'][1]);
$pdf->SetXY(137.3, 42.5);
$pdf->Write(0, $contract_data['start_time'][3]);
$pdf->SetXY(142.3, 42.5);
$pdf->Write(0, $contract_data['start_time'][4]);
//Дата начала
$pdf->SetXY(156, 42.5);
$pdf->Write(0, $contract_data['start_date'][0]);
$pdf->SetXY(161, 42.5);
$pdf->Write(0, $contract_data['start_date'][1]);
$pdf->SetXY(168.7, 42.5);
$pdf->Write(0, $contract_data['start_date'][3]);
$pdf->SetXY(173.9, 42.5);
开发者ID:pinicilin2006,项目名称:osago,代码行数:31,代码来源:bso.php

示例15: FPDI

else
	$pdf = new FPDI();

$pdf->setSourceFile(DATA_AVISO_OBRA_PATH.$_REQUEST["filename"].".".$_REQUEST["extension"]);
$pdf->AddPage();
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx);

$_REQUEST["x"] = $_REQUEST["x"] * 0.686;
$_REQUEST["y"] = $_REQUEST["y"] * 0.728;

if ($_REQUEST["tipoSello"] == "n") {
	$pdf->SetFont("Arial", "B", 14);
	$pdf->SetTextColor(0, 0, 0);

	$pdf->SetXY($_REQUEST["x"] + 8, $_REQUEST["y"] + 18);
	$pdf->Cell(0, 0, "NO CORRESPONDE PRESENTACIÓN");
	$pdf->SetXY($_REQUEST["x"] + 11, $_REQUEST["y"] + 24);
	$pdf->Cell(0, 0, "POR ACTIVIDAD DESARROLLADA");
}
else {
	$pdf->SetFont("Arial", "B", 16);
	switch ($_REQUEST["tipoSello"]) {
		case "e":
			$pdf->SetDrawColor(0, 0, 196);
			$pdf->SetTextColor(0, 0, 196);
			break;
		case "h":
			$pdf->SetDrawColor(196, 0, 0);
			$pdf->SetTextColor(196, 0, 0);
			break;
开发者ID:javierlov,项目名称:FuentesWeb,代码行数:31,代码来源:generar_pdf.php


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