$this->SetFont('Arial', '', 10); $this->MultiCell(0, 5, $this->pie, 0, C); } } $db = new ConnectionHandler("{$ruta_raiz}"); $db->conn->SetFetchMode(ADODB_FETCH_ASSOC); $pdf = new PDF('p', 'mm', 'letter'); $pdf->pie = $pie; $pdf->AddPage(); $pdf->SetTitle("Departamento Nacional de Planeacion"); $pdf->SetLeftMargin(25); $pdf->SetRightMargin(25); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(50, 5, $numradicado, 0, 1, L); $pdf->Cell(105, 5, $lugar . "., " . $fecha, 0, 1, L); $pdf->ln(18); $pdf->SetFont('Arial', '', 12); $pdf->write(5, $asu); $pdf->ln(25); $pdf->Cell(60, 5, $mensaje, 0, 1, L); $pdf->ln(5); $pdf->MultiCell(0, 5, $reseptor, 0, L); $primerno = substr($numRadicadoPadre, 0, 4); $segundono = substr($numRadicadoPadre, 4, 3); $ruta = "/" . $primerno . "/" . $segundono . "/docs/" . $numradicado; $adjuntos = BODEGAPATH . $ruta; $pdf->Output($adjuntos . '.pdf', 'f'); $enlace = "../bodega" . $ruta . '.pdf'; radi_paht($db, $ruta, $numradicado); return $numradicado . '.pdf'; }
public static function generate($dbh, $appID, $method = 'I') { $data = self::get($dbh, $appID); //if (strlen($socialnumber) > 20) $socialnumber = $this->decrypt($socialnumber); $socialnumber = ''; //Blank out social on forms per Maria 6/6/2013 // initiate PDF $pdf = new PDF(); $pdf->SetMargins(PDF_MARGIN_LEFT, 10, PDF_MARGIN_RIGHT); // add a page $pdf->AddPage(); $pdf->SetFont("Helvetica", "", 11); $pdf->SetXY(33, 30); $pdf->Write(5, date('m/d/Y', strtotime($data['appDate']))); $pdf->SetXY(85, 30); $pdf->Write(5, $data['jobName']); $pdf->SetXY(30, 36); $pdf->Write(5, $data['lastname']); $pdf->SetXY(110, 36); $pdf->Write(5, $data['firstname']); $pdf->SetXY(170, 36); $pdf->Write(5, $data['middlename']); $pdf->SetXY(30, 62); $pdf->Write(5, $data['address']); $pdf->SetXY(105, 62); $pdf->Write(5, $data['city']); $pdf->SetXY(162, 62); $pdf->Write(5, $data['state']); $pdf->SetXY(187, 62); $pdf->Write(5, $data['zip']); $pdf->SetXY(70, 69); $pdf->Write(5, $data['years']); $pdf->SetXY(105, 69); $pdf->Write(5, $data['phone']); $pdf->SetXY(122, 76); $pdf->Write(5, $data['email']); $pdf->SetFont("Helvetica", "", 10); $highestx = 59 + $data['highestgrade'] * 5.4; if ($data['highestgrade'] > 8) { $highestx += 19; } if ($data['highestgrade'] > 12) { $highestx += 20; } $pdf->SetXY($highestx, 152); $pdf->Write(5, 'Highest'); $pdf->SetXY(46, 175); $pdf->Write(5, $data['highschool']); $pdf->SetXY(46, 184); $pdf->Write(5, $data['highschoolloc']); $pdf->SetXY(101, 175); $pdf->Write(5, $data['highschoolyears']); $pdf->SetXY(129, 175); $pdf->Write(5, $data['coursesubject']); $pdf->SetXY(174.5, 175); $pdf->write(5, $data['coursesubjectgraduated'] == 'Yes' ? 'X' : ''); $pdf->SetXY(174.5, 184); $pdf->write(5, $data['coursesubjectgraduated'] == 'GED' ? 'X' : ''); $pdf->SetXY(46, 193); $pdf->Write(5, $data['collegeuniversity']); $pdf->SetXY(46, 202); $pdf->Write(5, $data['collegeuniversityloc']); $pdf->SetXY(101, 193); $pdf->Write(5, $data['collegeuniversityyearscompleted']); $pdf->SetXY(129, 193); $pdf->Write(5, $data['collegeuniversitycourse']); $pdf->SetXY(174.5, 191); $pdf->write(5, $data['collegegraduated'] == 'Yes' ? 'X' : ''); $pdf->SetXY(184, 194); $pdf->Write(5, $data['collegegraduatedMonth']); $pdf->SetXY(196, 194); $pdf->Write(5, $data['collegegraduatedYear']); $pdf->SetXY(174.5, 202); $pdf->write(5, $data['collegegraduated'] == 'InP' ? 'X' : ''); $pdf->SetXY(46, 210); $pdf->Write(5, $data['othercollege']); $pdf->SetXY(46, 222); $pdf->Write(5, $data['othercollegeloc']); $pdf->SetXY(101, 214); $pdf->Write(5, $data['othercollegeyears']); $pdf->SetXY(129, 210); $pdf->Write(5, $data['othercollegecourse']); $pdf->SetXY(174.5, 209); $pdf->write(5, $data['othercollegecompleted'] == 'Yes' ? 'X' : ''); $pdf->SetXY(184, 213); $pdf->Write(5, $data['othercollegecompletedMonth']); $pdf->SetXY(194, 213); $pdf->Write(5, $data['othercollegecompletedYear']); $pdf->SetXY(174.5, 219); $pdf->write(5, $data['othercollegecompleted'] == 'Pro' ? 'X' : ''); $pdf->SetXY(128, 260.5); $pdf->Write(5, $data['language']); $pdf->SetXY(163, 260.5); $pdf->write(5, $data['languagespeak'] ? 'X' : ''); $pdf->SetXY(177, 260.5); $pdf->write(5, $data['languageread'] ? 'X' : ''); $pdf->SetXY(190, 260.5); $pdf->write(5, $data['languagewrite'] ? 'X' : ''); $pdf->AddPage(); $y = 0; $pdf->SetXY(10, $y + 46); $pdf->Write(5, $data['companyname1']); $pdf->SetXY(10, $y + 55); $pdf->MultiCell(50, 10, $data['companyaddress1'], 0, 'L'); $pdf->SetXY(10, $y + 64); $pdf->Write(5, $data['companyphone1']); $pdf->SetXY(10, $y + 72); $pdf->Write(5, $data['supervisorname1']); $pdf->SetXY(60, $y + 52); $pdf->MultiCell(80, 35, $data['responsibilities1'], 0, 'L'); $pdf->SetXY(141, $y + 56); $pdf->MultiCell(60, 25, $data['reasonforleaving1'], 0, 'L'); $pdf->SetXY(160, $y + 64); $pdf->write(5, "{$data['startwages1']} -> {$data['endedwages1']}"); if ($data['maywecontact1'] == 'Yes') { $pdf->SetXY(146, $y + 73); } else { $pdf->SetXY(178, $y + 73); } $pdf->write(5, 'X'); $y = 33; $pdf->SetXY(10, $y + 46); $pdf->Write(5, $data['companyname2']); $pdf->SetXY(10, $y + 55); $pdf->MultiCell(50, 10, $data['companyaddress2'], 0, 'L'); $pdf->SetXY(10, $y + 64); $pdf->Write(5, $data['companyphone2']); $pdf->SetXY(10, $y + 72); $pdf->Write(5, $data['supervisorname2']); $pdf->SetXY(60, $y + 52); $pdf->MultiCell(80, 35, $data['responsibilities2'], 0, 'L'); $pdf->SetXY(141, $y + 56); $pdf->MultiCell(60, 25, $data['reasonforleaving2'], 0, 'L'); $pdf->SetXY(160, $y + 64); $pdf->write(5, "{$data['startwages2']} -> {$data['endedwages2']}"); if ($data['maywecontact2'] == 'Yes') { $pdf->SetXY(140, $y + 73); } else { $pdf->SetXY(178, $y + 73); } $pdf->write(5, 'X'); $y = 66.5; $pdf->SetXY(10, $y + 46); $pdf->Write(5, $data['companyname3']); $pdf->SetXY(10, $y + 55); $pdf->MultiCell(50, 10, $data['companyaddress3'], 0, 'L'); $pdf->SetXY(10, $y + 64); $pdf->Write(5, $data['companyphone3']); $pdf->SetXY(10, $y + 72); $pdf->Write(5, $data['supervisorname3']); $pdf->SetXY(60, $y + 52); $pdf->MultiCell(80, 35, $data['responsibilities3'], 0, 'L'); $pdf->SetXY(141, $y + 56); $pdf->MultiCell(60, 25, $data['reasonforleaving3'], 0, 'L'); $pdf->SetXY(160, $y + 64); $pdf->write(5, "{$data['startwages3']} -> {$data['endedwages3']}"); if ($data['maywecontact3'] == 'Yes') { $pdf->SetXY(140, $y + 73); } else { $pdf->SetXY(178, $y + 73); } $pdf->write(5, 'X'); $pdf->SetXY(44, 265); $pdf->MultiCell(95, 10, "Signed Online as {$data['signature']} from {$data['ipAddress']}", 0, 'L'); $pdf->SetXY(150, 265); $pdf->Write(5, $data['appDate']); $pdf->AddPage(); $pdf->SetXY(26, 42); $pdf->Write(5, $data['lastname']); $pdf->SetXY(101, 42); $pdf->Write(5, $data['firstname']); $pdf->SetXY(172, 42); $pdf->Write(5, substr($data['middlename'], 0, 1)); $pdf->SetXY(115, 50); $pdf->Write(5, $data['zip']); $pdf->SetXY(48, 57); $pdf->Write(5, $data['jobName']); $pdf->SetXY(48, 57); $pdf->Write(5, $data['jobName']); $filename = $data['firstname'] . '_' . $data['lastname'] . '_app.pdf'; if ($method == 'F') { $pdf->Output(__DIR__ . '../../public_html/img/pdf/' . $filename, 'F'); return 'img/pdf/' . $filename; } elseif ($method == 'I') { $pdf->Output(__DIR__ . '../../public_html/img/pdf/' . $filename, 'I'); die; } }
$pdf->AliasNbPages(); $pdf->AddPage(); //parameter could be path where you want to save pdf $pdf->SetFont("Times", "", "12"); //"fontfamily","fontstyle","fontsize" for ($i = 1; $i <= 40; $i++) { $pdf->Cell(0, 10, "My PDF PAGE" . $i, 0, 1, "C"); } //width,height ,,content,border,1->newline 0->append in same line ,alignment $pdf->SetFont("Arial", "", "10"); //"fontfamily","fontstyle","fontsize" $pdf->Cell(0, 10, "Second line", 0, 1, "C"); //width,height ,,content,border,1->newline 0->append in same line ,alignment $pdf->SetFont("Arial", "", "10"); //"fontfamily","fontstyle","fontsize" $pdf->write(5, "data"); //height_of_data, content $pdf->Output(); ?> <?//php // if(!empty($_POST['submit'])) // { // $f_name = $_POST['first_name']; // $l_name = $_POST['last_name']; // require("fpdf/fpdf.php"); // $pdf = new FPDF(); // $pdf->AddPage(); // //var_dump(get_class_methods($pdf)); // $pdf->SetFont('Arial','B','15');
$pdf -> Cell(0,5, 'FINEBOOK', '0','1', 'C', false); $pdf -> SetFont('Arial', 'i', 8); $pdf -> Cell(0,5, 'Semoga kita selalu berada dalam lindungan Allah SWT', '0', '1', 'C', false); $pdf -> Ln(3); $pdf -> Cell(190,0.6,'','0','1', 'C', true); $pdf -> Ln(5); $pdf -> SetFont('Arial', 'B', 9); $pdf -> Cell(50,5, 'LAPORAN BUKU', '0','1', 'L', false); $pdf -> Ln(3); */ $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(0, 5, 'LAPORAN BUKU', '0', '1', 'C', false); $pdf->ln(); $pdf->SetFont('Arial', 'B', 8); $pdf->write(5, 'Berikut adalah data buku yang sudah masuk FINEBOOK pada bulan Januari 2016 :'); $pdf->ln(10); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(8, 9, 'No', 1, 0, 'C'); $pdf->Cell(17, 9, 'Kode Buku', 1, 0, 'C'); $pdf->Cell(55, 9, 'Judul Buku', 1, 0, 'C'); $pdf->Cell(40, 9, 'Penerbit', 1, 0, 'C'); $pdf->Cell(20, 9, 'Tahun Terbit', 1, 0, 'C'); $pdf->Cell(37, 9, 'Kategori', 1, 0, 'C'); $pdf->Cell(15, 9, 'Harga', 1, 0, 'C'); $pdf->Ln(0); $no = 0; $query = mysql_query("select * from buku"); while ($data = mysql_fetch_array($query)) { $no++; $pdf->Ln(10);
$this->Write(1, 'DINAS SOSIAL DAN TENAGA KERJA'); $this->Ln(3); $this->Cell(15); $this->Write(1, 'Jl. K.H. WAHID HASYIM NO. 14'); $this->Ln(3); $this->Cell(25); $this->Write(1, 'MEDAN - 20145'); $this->Line(3, 27, 90, 27); $this->Ln(15); } } $pdf = new PDF(); $pdf->AddPage(); $pdf->SetFont('Times', '', 10); $pdf->Cell(8); $pdf->write(0, $baris1); $pdf->Ln(5); $pdf->Cell(10); $pdf->write(0, 'NOMOR URUT AGENDA : '); $pdf->Write(0, $baris1); $pdf->Ln(10); $pdf->Cell(1); $pdf->write(0, 'TANGGAL : '); $pdf->Write(0, $baris1); $pdf->Ln(5); $pdf->Cell(1); $pdf->write(0, 'NAMA PERUSAHAAN : '); $pdf->Write(0, $baris1); $pdf->Ln(5); $pdf->Cell(1); $pdf->write(0, 'ALAMAT PERUSAHAAN : ');
} function PutLink($URL, $txt) { // Put a hyperlink $this->setTextColor(0, 0, 255); $this->setStyle('U', true); $this->write(5, $txt, $URL); $this->setStyle('U', false); $this->setTextColor(0); } } $html = 'You can now easily print text mixing different styles: **bold**, <i>italic</i>, <u>underlined</u>, or **<i><u>all at once</u></i>**!You can also insert links on text, such as <a href="http://www.fpdf.org">www.fpdf.org</a>, or on an image: click on the logo.'; $pdf = new PDF(); // First page $pdf->addPage(); $pdf->setFont('Arial', '', 20); $pdf->write(5, "To find out what's new in this tutorial, click "); $pdf->setFont('', 'U'); $link = $pdf->addLink(); $pdf->write(5, 'here', $link); $pdf->setFont(''); // Second page $pdf->addPage(); $pdf->setLink($link); $pdf->image('logo.png', 10, 12, 30, 0, '', 'http://www.fpdf.org'); $pdf->setLeftMargin(45); $pdf->setFontSize(14); $pdf->writeHTML($html); $pdf->output();
/** * print_PDF prints the Repertory result table in an PDF file. * * @param string $task 'save_PDF'|'print_PDF': if 'save_PDF' the PDF should get downloaded, if 'print_PDF' the PDF should open in the browser * @return void * @access public */ function print_PDF($task) { global $session; if ($task == 'save_PDF') { $dest = 'D'; } else { $dest = 'I'; } if ($session->lang == 'de') { $date = $this->date_to_german($this->date); } else { $date = $this->date; } $pdf = new PDF('L'); $pdf->SetTopMargin(20); $pdf->SetFont('Arial', '', 12); $pdf->SetTitle(_("Repertorization result"), true); $pdf->SetAuthor(_("OpenHomeopath"), true); $pdf->SetCreator(_("openhomeo.org"), true); $pdf->AddPage(); $w1 = $pdf->GetStringWidth(_('Patient:') . ' ' . _('Rep.-Date:') . ' '); $w3 = $pdf->GetStringWidth(_('Case taking:') . ' '); $w4 = $pdf->GetStringWidth(_('Prescription:') . ' ' . _('Rep.-No.:') . ' '); $pdf->SetFont('', 'B'); $w2 = $pdf->GetStringWidth(iconv('UTF-8', 'windows-1252', $this->patient) . $date . $date); $pdf->SetFont('', ''); $pdf->write(7, _('Patient:') . ' '); $pdf->SetFont('', 'B'); $pdf->write(7, iconv('UTF-8', 'windows-1252', $this->patient)); $pdf->SetFont('', ''); // Move to the right $pdf->Cell(295 - ($w1 + $w2)); $pdf->Cell(0, 7, _('Rep.-Date:') . ' '); $pdf->SetFont('', 'B'); $pdf->Cell(0, 7, $date, 0, 1, 'R'); $pdf->SetFont('', ''); $pdf->write(7, _('Prescription:') . ' '); $pdf->SetFont('', 'B'); $pdf->write(7, iconv('UTF-8', 'windows-1252', $this->prescription)); if (!empty($this->rep_id)) { $pdf->SetFont('', ''); // Move to the right $pdf->Cell(295 - ($w1 + $w2)); $pdf->Cell(0, 7, _('Rep.-No.:') . ' '); $pdf->SetFont('', 'B'); $pdf->Cell(0, 7, $this->rep_id, 0, 1, 'R'); } else { $pdf->Ln(7); } $pdf->SetFont('', ''); $pdf->write(7, _('Case taking:') . ' '); $pdf->SetFont('', 'I', 11); $pdf->Cell(0, 1, "", 0, 2); $note_ar = explode("%br", $this->note); foreach ($note_ar as $note_line) { $pdf->Cell(0, 5, iconv('UTF-8', 'windows-1252', $note_line), 0, 2); } // Line break $pdf->Ln(10); $header_ar = array(); $first_row_ar = array(); $data_ar = array(); $this->get_table_data($header_ar, $first_row_ar, $data_ar, $summary); $pdf->create_result_table($header_ar, $first_row_ar, $data_ar, 70); $pdf->SetFont('Arial', '', 10); $pdf->Ln(5); $pdf->write(7, iconv('UTF-8', 'windows-1252', $summary)); $pdf->Output("OpenHomeopath_" . _("Repertorization result") . "_" . date("Y-m-d_H-i") . ".pdf", $dest); }
public static function generate($dbh, $appID, $method = 'I') { $data = self::get($dbh, $appID); //if (strlen($socialnumber) > 20) $socialnumber = $this->decrypt($socialnumber); $socialnumber = ''; //Blank out social on forms per Maria 6/6/2013 // initiate PDF $pdf = new PDF(); $pdf->SetMargins(PDF_MARGIN_LEFT, 10, PDF_MARGIN_RIGHT); // add a page $pdf->AddPage(); $pdf->SetFont("Helvetica", "", 11); $pdf->SetXY(150, 37); $pdf->Write(5, date('m/d/Y', strtotime($data['appDate']))); $pdf->SetXY(45, 45); $pdf->Write(5, $data['lastname']); $pdf->SetXY(100, 45); $pdf->Write(5, $data['firstname']); $pdf->SetXY(150, 45); $pdf->Write(5, $data['middlename']); $pdf->SetXY(40, 95); $pdf->Write(5, $data['address']); $pdf->SetXY(95, 95); $pdf->Write(5, $data['city']); $pdf->SetXY(125, 95); $pdf->Write(5, $data['state']); $pdf->SetXY(150, 95); $pdf->Write(5, $data['zip']); /* $pdf->SetXY(70, 69); $pdf->Write(5, $data['years']); */ $pdf->SetXY(125, 55); $pdf->Write(5, $data['phone']); $pdf->SetXY(32, 66); $pdf->Write(5, $data['referral']); $pdf->SetXY(15, 82); $pdf->Write(5, $data['othername']); $pdf->SetXY(15, 111); $pdf->Write(5, $data['friendsRelatives']); $pdf->SetXY(30, 131); $pdf->Write(5, $data['jobName']); $pdf->SetXY(130, 131); $pdf->Write(5, date('m/d/Y', strtotime($data['dateStart']))); $pdf->SetXY(46, 140); $pdf->Write(5, $data['expectedPay']); $pdf->SetXY(140, 140); $pdf->Write(5, $data['employeedNow']); $pdf->SetXY(86, 148); $pdf->Write(5, $data['contactEmployer']); $pdf->SetXY(80, 156); $pdf->Write(5, $data['haveYouWorkPreviously']); $pdf->SetXY(130, 156); $pdf->Write(5, $data['workedHereWhen']); $pdf->SetXY(80, 164); $pdf->Write(5, $data['appliedHere']); $pdf->SetXY(130, 164); $pdf->Write(5, $data['appliedHereWhen']); $pdf->SetXY(69, 173.5); $pdf->write(5, $data['workFullTime'] ? 'X' : ''); $pdf->SetXY(90, 173.5); $pdf->write(5, $data['workPartTime'] ? 'X' : ''); $pdf->SetXY(113, 173.5); $pdf->write(5, $data['workSeasonal'] ? 'X' : ''); /* workFullTime=:workFullTime, workPartTime=:workPartTime, workSeasonal=:workSeasonal, */ $pdf->SetFont("Helvetica", "", 10); $highestgrade = intval($data['highestgrade']); if ($highestgrade) { $highestx = 30 + $highestgrade * 6; $pdf->SetXY($highestx, 220); $pdf->Write(5, 'X'); } if ($data['highschoolyears']) { $highestx = 78 + $data['highschoolyears'] * 8; } $pdf->SetXY($highestx, 220); $pdf->Write(5, 'X'); if ($data['collegeyears']) { $collegeyearsx = 110 + $data['collegeyears'] * 8; $pdf->SetXY($collegeyearsx, 220); $pdf->Write(5, 'X'); } if ($data['othercollegeyears']) { $othercollegeyearsx = 142 + $data['othercollegeyears'] * 8; $pdf->SetXY($othercollegeyearsx, 220); $pdf->Write(5, 'X'); } $pdf->SetXY(51, 200); $pdf->MultiCell(30, 4.5, $data['gradeSchool'], 0, 'L'); $pdf->SetXY(51, 212); $pdf->Write(5, $data['gradeSchoolLoc']); $pdf->SetXY(83, 200); $pdf->MultiCell(30, 4.5, $data['highschool'], 0, 'L'); $pdf->SetXY(83, 212); $pdf->Write(5, $data['highschoolloc']); /* $pdf->SetXY(101, 175); $pdf->Write(5, $data['highschoolyears']); $pdf->SetXY(129, 175); $pdf->Write(5, $data['coursesubject']); */ $pdf->SetXY(83, 228); $pdf->write(5, $data['coursesubjectgraduated']); $pdf->SetXY(114, 200); $pdf->MultiCell(30, 4.5, $data['collegeuniversity'], 0, 'L'); $pdf->SetXY(114, 212); $pdf->Write(5, $data['collegeuniversityloc']); /* $pdf->SetXY(101, 228); $pdf->Write(5, $data['collegeuniversityyearscompleted']); */ $pdf->SetXY(114, 226); $pdf->Write(5, $data['collegeuniversitycourse']); $pdf->SetXY(114, 230); $pdf->write(5, $data['collegegraduated'] == 'Yes' ? 'Graduated' : ''); $pdf->SetXY(114, 230); $pdf->write(5, $data['collegegraduated'] == 'InP' ? 'In Process' : ''); /* $pdf->SetXY(184, 194); $pdf->Write(5, $data['collegegraduatedMonth']); $pdf->SetXY(196, 194); $pdf->Write(5, $data['collegegraduatedYear']); */ $pdf->SetXY(148, 200); $pdf->MultiCell(30, 4.5, $data['othercollege'], 0, 'L'); $pdf->SetXY(148, 212); $pdf->Write(5, $data['othercollegeloc']); /* $pdf->SetXY(101, 214); $pdf->Write(5, $data['othercollegeyears']); */ $pdf->SetXY(148, 226); $pdf->Write(5, $data['othercollegecourse']); $pdf->SetXY(148, 230); $pdf->write(5, $data['othercollegecompleted'] == 'Yes' ? 'Graduated' : ''); $pdf->SetXY(148, 230); $pdf->write(5, $data['othercollegecompleted'] == 'InP' ? 'In Progress' : ''); $pdf->SetXY(50, 234); $pdf->MultiCell(130, 4.5, $data['courseOfStudy'], 0, 'L'); $pdf->AddPage(); $y = 0; $pdf->SetXY(55, 15); $pdf->MultiCell(120, 4.5, $data['describeRelevantTraining'], 0, 'L'); $pdf->SetXY(55, 40); $pdf->MultiCell(120, 4.5, $data['describeHonorsReceived'], 0, 'L'); $pdf->SetXY(55, 59); $pdf->MultiCell(120, 4.5, $data['listProfessionalActivities'], 0, 'L'); if ($data['languagespeak']) { if ($data['languagespeak'] == 3) { $y = 60; } elseif ($data['languagespeak'] == 2) { $y = 100; } elseif ($data['languagespeak'] == 1) { $y = 140; } $pdf->SetXY($y, 95); $pdf->write(5, $data['language']); } if ($data['languageread']) { if ($data['languageread'] == 3) { $y = 60; } elseif ($data['languageread'] == 2) { $y = 100; } elseif ($data['languageread'] == 1) { $y = 140; } $pdf->SetXY($y, 101); $pdf->write(5, $data['language']); } if ($data['languagewrite']) { if ($data['languagewrite'] == 3) { $y = 60; } elseif ($data['languagewrite'] == 2) { $y = 100; } elseif ($data['languagewrite'] == 1) { $y = 140; } $pdf->SetXY($y, 107); $pdf->write(5, $data['language']); } if ($data['military'] == 'No') { $pdf->SetXY(72, 117); } else { $pdf->SetXY(88, 117); } $pdf->Write(5, 'X'); $pdf->SetXY(124, 117); $pdf->Write(5, $data['militaryRank']); $pdf->SetXY(38, 125); $pdf->Write(5, $data['militaryAwards']); $pdf->SetXY(13, 137.5); $pdf->Write(5, $data['militarySkills']); $pdf->SetXY(24, 150); $pdf->Write(5, $data['DLState']); $pdf->SetXY(80, 150); $pdf->Write(5, $data['DLNumber']); $pdf->SetXY(150, 150); $pdf->Write(5, date('m/d/Y', strtotime($data['DLExpiration']))); $pdf->SetXY(17, 162); $pdf->Write(5, $data['DrivingRestrictions']); if ($data['nonCompeteAgreement'] == 'No') { $pdf->SetXY(24.5, 178); } else { $pdf->SetXY(50, 178); } $pdf->Write(5, 'X'); if ($data['over18'] == 'No') { $pdf->SetXY(76, 186.5); } else { $pdf->SetXY(89, 186.5); } $pdf->Write(5, 'X'); if ($data['commitedCrime'] == 'Yes') { $pdf->SetXY(77, 243.5); } else { $pdf->SetXY(105, 243.5); } $pdf->Write(5, 'X'); $pdf->SetXY(12, 253); $pdf->MultiCell(180, 4.5, $data['commitedCrimeExplain'], 0, 'L'); $pdf->AddPage(); $y = 0; if ($data['awaitingTrial'] == 'Yes') { $pdf->SetXY(41.5, 16.5); } else { $pdf->SetXY(52, 16.5); } $pdf->Write(5, 'X'); $pdf->SetXY(12, 21); $pdf->MultiCell(180, 4.5, $data['explainTrial'], 0, 'L'); if ($data['actofViolence'] == 'Yes') { $pdf->SetXY(100, 29); } else { $pdf->SetXY(116, 29); } $pdf->Write(5, 'X'); if ($data['usedIllegalDrugs'] == 'No') { $pdf->SetXY(99.5, 36); } else { $pdf->SetXY(116, 36); } $pdf->Write(5, 'X'); $pdf->SetXY(84, 44); $pdf->MultiCell(180, 4.5, $data['illegaldrugsWhy'], 0, 'L'); if ($data['abletoperformduties'] == 'No') { $pdf->SetXY(167, 53); } else { $pdf->SetXY(179, 53); } $pdf->Write(5, 'X'); $y = 40; $pdf->SetXY(13, $y + 35); $pdf->Write(5, $data['companyname1']); $pdf->SetXY(13, $y + 43.5); $pdf->MultiCell(50, 4.5, $data['companyaddress1'], 0, 'L'); $pdf->SetXY(72, $y + 45); $pdf->Write(5, date('m/d/Y', strtotime($data['datestarted1']))); $pdf->SetXY(100, $y + 45); $pdf->Write(5, date('m/d/Y', strtotime($data['dateended1']))); $pdf->SetXY(125, $y + 42); $pdf->MultiCell(52, 4.5, $data['responsibilities1'], 0, 'L'); $pdf->SetXY(13, $y + 59); $pdf->Write(5, $data['companyphone1']); $pdf->SetXY(13, $y + 69); $pdf->Write(5, $data['jobTitle1']); $pdf->SetXY(40, $y + 69); $pdf->Write(5, $data['supervisorname1']); $pdf->SetXY(70, $y + 69); $pdf->Write(5, $data['startwages1']); $pdf->SetXY(97, $y + 69); $pdf->Write(5, $data['endedwages1']); $pdf->SetXY(13, $y + 80); $pdf->MultiCell(165, 4.5, $data['reasonforleaving1'], 0, 'L'); $y = 101.5; $pdf->SetXY(13, $y + 35); $pdf->Write(5, $data['companyname2']); $pdf->SetXY(13, $y + 43.5); $pdf->MultiCell(50, 4.5, $data['companyaddress2'], 0, 'L'); $pdf->SetXY(72, $y + 45); $pdf->Write(5, date('m/d/Y', strtotime($data['datestarted2']))); $pdf->SetXY(100, $y + 45); $pdf->Write(5, date('m/d/Y', strtotime($data['dateended2']))); $pdf->SetXY(125, $y + 42); $pdf->MultiCell(52, 4.5, $data['responsibilities2'], 0, 'L'); $pdf->SetXY(13, $y + 59); $pdf->Write(5, $data['companyphone2']); $pdf->SetXY(13, $y + 69); $pdf->Write(5, $data['jobTitle2']); $pdf->SetXY(40, $y + 69); $pdf->Write(5, $data['supervisorname2']); $pdf->SetXY(70, $y + 69); $pdf->Write(5, $data['startwages2']); $pdf->SetXY(97, $y + 69); $pdf->Write(5, $data['endedwages2']); $pdf->SetXY(13, $y + 80); $pdf->MultiCell(165, 4.5, $data['reasonforleaving2'], 0, 'L'); $y = 163; $pdf->SetXY(13, $y + 35); $pdf->Write(5, $data['companyname3']); $pdf->SetXY(13, $y + 43.5); $pdf->MultiCell(50, 4.5, $data['companyaddress3'], 0, 'L'); $pdf->SetXY(72, $y + 45); $pdf->Write(5, date('m/d/Y', strtotime($data['datestarted3']))); $pdf->SetXY(100, $y + 45); $pdf->Write(5, date('m/d/Y', strtotime($data['dateended3']))); $pdf->SetXY(125, $y + 42); $pdf->MultiCell(52, 4.5, $data['responsibilities3'], 0, 'L'); $pdf->SetXY(13, $y + 59); $pdf->Write(5, $data['companyphone3']); $pdf->SetXY(13, $y + 69); $pdf->Write(5, $data['jobTitle3']); $pdf->SetXY(40, $y + 69); $pdf->Write(5, $data['supervisorname3']); $pdf->SetXY(70, $y + 69); $pdf->Write(5, $data['startwages3']); $pdf->SetXY(97, $y + 69); $pdf->Write(5, $data['endedwages3']); $pdf->SetXY(13, $y + 80); $pdf->MultiCell(165, 4.5, $data['reasonforleaving3'], 0, 'L'); $pdf->AddPage(); $pdf->SetXY(31, 15.5); $pdf->MultiCell(155, 6, $data['employmentGaps'], 0, 'L'); $y = 57; $pdf->SetXY(16, $y); $pdf->Write(5, $data['Reference1Name']); $pdf->SetXY(55, $y); $pdf->Write(5, $data['Reference1Address']); $pdf->SetXY(110, $y); $pdf->Write(5, $data['Reference1Phone']); $pdf->SetXY(165, $y); $pdf->Write(5, $data['Reference1Aquainted']); $y = 63; $pdf->SetXY(16, $y); $pdf->Write(5, $data['Reference2Name']); $pdf->SetXY(55, $y); $pdf->Write(5, $data['Reference2Address']); $pdf->SetXY(110, $y); $pdf->Write(5, $data['Reference2Phone']); $pdf->SetXY(165, $y); $pdf->Write(5, $data['Reference2Aquainted']); $y = 69; $pdf->SetXY(16, $y); $pdf->Write(5, $data['Reference3Name']); $pdf->SetXY(55, $y); $pdf->Write(5, $data['Reference3Address']); $pdf->SetXY(110, $y); $pdf->Write(5, $data['Reference3Phone']); $pdf->SetXY(165, $y); $pdf->Write(5, $data['Reference3Aquainted']); $pdf->SetXY(55, 78); $pdf->Write(5, $data['emergencyName']); $pdf->SetXY(16, 85.5); $pdf->Write(5, $data['emergencyAddress']); $pdf->SetXY(110, 85.5); $pdf->Write(5, $data['emergencyPhone']); if ($data['waiverecords'] == 'Yes') { $pdf->SetXY(46, 116.5); } else { $pdf->SetXY(66.5, 116.5); } $pdf->Write(5, 'X'); $pdf->SetXY(25, 245); $pdf->Write(5, $data['appDate']); $pdf->SetXY(93, 245); $pdf->Write(5, "Signed Online as {$data['signature']} from {$data['ipAddress']}", 0, 'L'); $filename = $data['firstname'] . '_' . $data['lastname'] . '_app.pdf'; if ($method == 'F') { $pdf->Output(__DIR__ . '../../public_html/img/pdf/' . $filename, 'F'); return 'img/pdf/' . $filename; } elseif ($method == 'I') { $pdf->Output(__DIR__ . '../../public_html/img/pdf/' . $filename, 'I'); die; } }
$this->Ln(3); $this->Cell(15); $this->Write(1, 'Jl. K.H. WAHID HASYIM NO. 14'); $this->Ln(3); $this->Cell(25); $this->Write(1, 'MEDAN - 20145'); $this->Line(3, 27, 90, 27); $this->Ln(15); } } $pdf = new PDF(); $pdf->AddPage(); $pdf->SetFont('Times', '', 10); if ($jenis_urus == '02') { $pdf->Cell(24); $pdf->write(0, $pengurusan); } if ($jenis_urus == '01') { $pdf->Cell(22); $pdf->write(0, $pengurusan); } else { $pdf->Cell(8); $pdf->write(0, $pengurusan); } $pdf->Ln(5); $pdf->Cell(10); $pdf->write(0, 'NOMOR URUT AGENDA : '); $pdf->Write(0, $no_resi); $pdf->Ln(5); $pdf->Cell(1); $pdf->write(0, 'CATATAN : ');