/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
main
/
print
/
up file
home
<?php include("qrcodegenerate/qrlib.php"); $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->SetAutoPageBreak(false); $pdf->AddFont('THSarabunNew', '', 'THSarabunNew.php'); $pdf->AddFont('THSarabunNew Bold', '', 'THSarabunNew Bold.php'); $pdf->AddFont('THSarabunNew BoldItalic', '', 'THSarabunNew BoldItalic.php'); $qr_code_id = $row['member_id']; unlink('./qrcode/' . $qr_code_id . '.png'); // Add QR code $tempDir = "./qrcode/"; $codeContents = "https://efa-member.com/main/ajax/join/rules.pdf"; // $codeContents = "https://efa-member.com/qr?id=".$qr_code_id; // $codeContents = $qr_code_id; // // we need to generate filename somehow, // // with md5 or with database ID used to obtains $codeContents... $fileName = $qr_code_id . '.png'; $pngAbsoluteFilePath = $tempDir . $fileName; $urlRelativeFilePath = $tempDir . $fileName; // // generating if (!file_exists($pngAbsoluteFilePath)) { QRcode::png($codeContents, $pngAbsoluteFilePath, QR_ECLEVEL_L, 15, 0); } $pdf->AddPage(); // $pdf->Image('A4.jpg',0,0,210,297,'JPG'); // $pdf->Image('tick.png',31,179,5,5,'PNG'); // $pdf->Image('tick.png',31,187,5,5,'PNG'); // $pdf->Image('tick.png',31,194,5,5,'PNG'); // $pdf->Image('tick.png',31,201,5,5,'PNG'); // $pdf->Image('tick.png',31,208,5,5,'PNG'); // $pdf->Image('tick.png',31,243,5,5,'PNG'); // $pdf->Image('tick.png',31,250,5,5,'PNG'); // $pdf->Image('square.png',34,189,5,5,'PNG'); // $pdf->Image('square.png',34,196,5,5,'PNG'); // $pdf->Image('square.png',34,203,5,5,'PNG'); // $pdf->Image('square.png',34,210,5,5,'PNG'); // $pdf->Image('square.png',34,217,5,5,'PNG'); ///////////////////////ส่วนหัวข้อ/////////////////////////////////// $pdf->SetFont('THSarabunNew Bold', '', 16); $pdf->SetFont('THSarabunNew Bold', '', 18.5); $pdf->SetXY(90, 18); //ใบสมัครสมาชิก $pdf->MultiCell(200, 5, iconv('UTF-8', 'cp874', 'ใบสมัครสมาชิก'), 0, 'L', 0); $pdf->SetFont('THSarabunNew Bold', '', 18.5); $pdf->SetXY(41.8, 26); //สมาคมผู้ประกอบการนำคนต่างด้าวมาทำงานที่ประเทศ $pdf->MultiCell(200, 5, iconv('UTF-8', 'cp874', 'สมาคมผู้ประกอบการนำคนต่างด้าวมาทำงานในประเทศ(ประเทศไทย)'), 0, 'L', 0); $pdf->SetFont('THSarabunNew Bold', '', 12.5); $pdf->SetXY(44, 33); //Entrepreneurs bringing foreigners to work in the country (Thailand) Association $pdf->MultiCell(200, 5, iconv('UTF-8', 'cp874', 'Entrepreneurs bringing foreigners to work in the country (Thailand) Association'), 0, 'L', 0); $pdf->Image('Logo.png', 14.8, 11, 21, 21, 'PNG'); //LOGO if ($row['profile_image'] != '') { $profile_image = '../upload/join/' . $row['profile_image']; //รูป $pdf->Image($profile_image, 168.3, 18, 26.5, 31); } else { $pdf->Image('square.png', 168.3, 18.5, 26.5, 31, 'PNG'); //รูป $pdf->SetFont('THSarabunNew Bold', '', 14); $pdf->SetXY(175.7, 22); // $pdf->MultiCell(200, 5, iconv('UTF-8', 'cp874', 'รูปถ่าย'), 0, 'L', 0); $pdf->SetFont('THSarabunNew Bold', '', 14); $pdf->SetXY(175.7, 29.5); // $pdf->MultiCell(200, 5, iconv('UTF-8', 'cp874', '1.5นิ้ว'), 0, 'L', 0); $pdf->SetFont('THSarabunNew Bold', '', 14); $pdf->SetXY(172, 36.5); // $pdf->MultiCell(200, 5, iconv('UTF-8', 'cp874', 'ไม่เกิน 6 เดือน'), 0, 'L', 0); } $pdf->SetFont('THSarabunNew Bold', '', 14); $pdf->SetXY(171, 4); // $pdf->MultiCell(200, 5, iconv('UTF-8', 'cp874', 'สมช.1 นายจ้าง'), 0, 'L', 0); $pdf->SetXY(14, 43); // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'เลขที่........................................................'), 0, 'L', 0); $pdf->SetXY(14, 50); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'สมัครสมาชิกประเภท...............................'), 0, 'L', 0); $pdf->SetXY(14, 57); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ชื่อ - นามสกุล(ภาษาไทย)....................................................................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 64); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ชื่อ - นามสกุล(ภาษาอังกฤษ)...............................................................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 71); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'สัญชาติ.................................................................................................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 78); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'บัตรประจำตัวประชาชนเลขที่........................................................วัน/เดือน/ปี เกิด..................................................อายุ.................ปี'), 0, 'L', 0); $pdf->SetXY(14, 85); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ที่อยู่......................................................................................................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 92); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'โทรศัพท์มือถือ............................................................อีเมล์..................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 99); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'วุฒิการศึกษาสูงสุด................................................................................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 106); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ชื่อสถานที่ทำงาน..................................................................................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 113); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'เลขประจำตัวผู้เสียภาษี.........................................................................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 120); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ตำแหน่งงาน.........................................................................................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 127); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ที่อยู่สถานประกอบการ..........................................................................................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 134); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'โทรศัพท์..........................................................................อีเมล์..............................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 141); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'Line..........................................................................เว็บไซต์..............................................................................................................'), 0, 'L', 0); $pdf->SetXY(14, 148); ///////////////////////ส่วนคำตอบ/////////////////////////////////// $pdf->SetFont('THSarabunNew Bold', '', 14); $register_type = ""; switch ($rowMember['register_type']) { case '1': $register_type = "นายจ้าง"; break; case '2': $register_type = "บนจ."; break; case '3': $register_type = "Agency."; break; case '4': $register_type = "แรงงาน"; break; } $pdf->SetXY(28, 42); $pdf->MultiCell(0,5,iconv('UTF-8','cp874',$rowMember['register_no']),0,'L',0); $pdf->SetXY(45, 49); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $register_type), 0, 'L', 0); $pdf->SetXY(53, 56); // ชื่อ(ไทย) $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['member_name']), 0, 'L', 0); $pdf->SetXY(57, 63); // ชื่อ(อังกฤษ) $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['member_name_en']), 0, 'L', 0); $sql_race = "SELECT * FROM tbl_country WHERE ct_code = '{$row['race']}'"; $res_race = mysqli_query($connection, $sql_race); $row_race = mysqli_fetch_assoc($res_race); $pdf->SetXY(30, 70); // สัญชาติ $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row_race['ct_nameTHA']), 0, 'L', 0); $pdf->SetXY(57, 77); // เลขบัตร $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['citizen_no']), 0, 'L', 0); $pdf->SetXY(128, 77); // วันเกิด $birth_date = date("d", strtotime($row['birth_date'])) . " " . monthTH(date("m", strtotime($row['birth_date']))) . " " . (date("Y", strtotime($row['birth_date'])) + 543); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $birth_date), 0, 'L', 0); $pdf->SetXY(175, 77); // อายุ $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', ($row['birth_date'] != "") ? getAge(date("Y-m-d", strtotime($row['birth_date']))) : ""), 0, 'L', 0); $card_district_id = $row['card_district_id']; $sqlAddressCard = "SELECT `tbl_district`.`district_name_th` , `tbl_amphoe`.`amphoe_name_th` , `tbl_province`.`province_name_th` , `tbl_district`.`district_zipcode` FROM `tbl_district` JOIN `tbl_amphoe` ON `tbl_amphoe`.`amphoe_id` = `tbl_district`.`ref_amphoe` JOIN `tbl_province` ON `tbl_province`.`province_id` = `tbl_amphoe`.`ref_province` WHERE `tbl_district`.`district_id` = '$card_district_id'"; $rsAddressCard = mysqli_query($connection, $sqlAddressCard); $rowAddressCard = mysqli_fetch_array($rsAddressCard); //// ที่อยู่ $full_address = $row['card_address'] . " ตำบล" . $rowAddressCard['district_name_th'] . " อำเภอ" . $rowAddressCard['amphoe_name_th'] . " จังหวัด" . $rowAddressCard['province_name_th'] . " " . $rowAddressCard['district_zipcode']; $pdf->SetXY(23, 84); // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $full_address), 0, 'L', 0); $pdf->SetXY(96, 91); // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['email']), 0, 'L', 0); $pdf->SetXY(38, 91); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['phone']), 0, 'L', 0); $pdf->SetXY(42, 98); $education_level = ""; switch ($row['education_level']) { case '1': $education_level = "ปริญญาเอก"; break; case '2': $education_level = "ปริญญาโท"; break; case '3': $education_level = "ปริญญาตรี หรือ เทียบเท่า"; break; case '4': $education_level = "ต่ำกว่า ปริญญาตรี"; break; } $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $education_level), 0, 'L', 0); ////////////// สถานที่ทำงาน $pdf->SetXY(39, 105); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['company_name']), 0, 'L', 0); $pdf->SetXY(47, 112); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['company_tax_no']), 0, 'L', 0); $pdf->SetXY(33, 119); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['position']), 0, 'L', 0); $company_district_id = $row['company_district_id']; $sqlAddressCompany = "SELECT `tbl_district`.`district_name_th` , `tbl_amphoe`.`amphoe_name_th` , `tbl_province`.`province_name_th` , `tbl_district`.`district_zipcode` FROM `tbl_district` JOIN `tbl_amphoe` ON `tbl_amphoe`.`amphoe_id` = `tbl_district`.`ref_amphoe` JOIN `tbl_province` ON `tbl_province`.`province_id` = `tbl_amphoe`.`ref_province` WHERE `tbl_district`.`district_id` = '$company_district_id'"; $rsAddressCompany = mysqli_query($connection, $sqlAddressCompany); $rowAddressCompany = mysqli_fetch_array($rsAddressCompany); // ที่อยู่สถานที่ทำงาน $company_address = $row['company_address'] . " ตำบล" . $rowAddressCompany['district_name_th'] . " อำเภอ" . $rowAddressCompany['amphoe_name_th'] . " จังหวัด" . $rowAddressCompany['province_name_th'] . " " . $rowAddressCompany['district_zipcode']; $pdf->SetXY(50, 126); // เลขที่ $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $company_address), 0, 'L', 0); $pdf->SetXY(30, 133); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['company_phone']), 0, 'L', 0); $pdf->SetXY(100, 133); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['company_email']), 0, 'L', 0); $pdf->SetXY(25, 140); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['company_line']), 0, 'L', 0); $pdf->SetXY(98, 140); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['company_web']), 0, 'L', 0); if (!empty($row['member_signature'])) { $sig_img = '../upload/join/signature/' . $row['member_signature']; //รูป // $sig_img = '../upload/join/signature/output.png'; //รูป $pdf->Image($sig_img, 125, 229, 50, 15, 'PNG'); } $pdf->SetXY(128, 238); // ลงชื่อ $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', ''), 0, 'L', 0); $pdf->SetXY(132, 245); // ในวงเล็บ $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['member_name']), 0, 'L', 0); $pdf->SetXY(138, 252); // วันที่ $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', date("d/m/Y", strtotime('+543 years'))), 0, 'L', 0); //พ้อยเพิ่มเติมข้างล่าง $pdf->SetFont('THSarabunNew Bold', '', 14); $pdf->SetXY(26, 148); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ข้าพเจ้า ได้ศึกษาทำความเข้าใจในข้อบังคับของสมาชิกสมาคมผู้ประกอบการนำคนต่างด้าวมาทำงานในประเทศ(ประเทศไทย)'), 0, 'L', 0); $pdf->SetXY(17, 155); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'โดยละเอียดแล้ว ยินดีปฏิบัติตามข้อบังคับของสมาคมฯ และให้ความร่วมมือในกิจการของสมาคมฯ ทุกประการ ดังนี้'), 0, 'L', 0); $pdf->SetXY(26, 162); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ข้าพเจ้าขอรับรองว่าจะปฏิบัติตามกฎระเบียบและข้อบังคับของสมาคมฯ ทุกประการ (คูรายละเอียดข้อบังคับสมาคม'), 0, 'L', 0); $pdf->SetXY(17, 169); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ในเว็บไซต์ http://www.efa.or.th )'), 0, 'L', 0); $pdf->SetXY(26, 176); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ข้าพเจ้ารับทราบว่าการสมัครเป็นสมาชิก จะเสร็จสมบูรณ์เมื่อข้าพจ้าได้รับการรับรองจากคณะกรรมการสมาคมฯ และ'), 0, 'L', 0); $pdf->SetXY(17, 183); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'สมาคมฯได้แจ้งยืนยันให้ชำระค่าธรรมเนียมแรกเข้า โดยชำระเงินให้แล้ว เสร็จภายใน 30 วันนับจากการแจ้งรับเป็นสมาชิกสามัญ'), 0, 'L', 0); $pdf->SetXY(17, 190); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'หากเกินกำหนดดังกล่าวข้าพจ้ายินดีให้สมาคมฯ ยกเลิกการรับเป็นสมาชิก การคุ้มครองข้อมูลส่วนบุคคล'), 0, 'L', 0); $pdf->SetXY(26, 197); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ข้าพเจ้าในฐานะเจ้าของข้อมูลส่วนบุคคลได้รับทราบนโยบายคุ้มครองข้อมูลส่วนบุคคล (Pivacy Policy) ของสมาคมฯ'), 0, 'L', 0); $pdf->SetXY(17, 204); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'อย่างครบถ้วน โดยละเอียดดีแล้ว และขอให้ความยินยอมแก่ สมาคมฯ ในการเก็บรวบรวม ใช้เปิดเผย และโอน ไปต่างประเทศ'), 0, 'L', 0); $pdf->SetXY(17, 211); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ซึ่งข้อมูลส่วนบุคคล หรือข้อมูลส่วนบุคคลอ่อนไหว (Sensitive Data) ของข้าพเจ้าตามรายละเอียดที่ระบุไว้'), 0, 'L', 0); $pdf->SetXY(123, 239); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ลงชื่อ..............................................ผู้สมัคร'), 0, 'L', 0); $pdf->SetXY(123, 246); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', '(...............................................................)'), 0, 'L', 0); $pdf->SetXY(123, 253); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'วันที่......................................................'), 0, 'L', 0); $pdf->SetXY(17, 225); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ข้าพเจ้าได้ส่งหลักฐาน ดังนี้'), 0, 'L', 0); $pdf->SetXY(40, 232); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'สำเนาบัตรประจำตัวประชาชน'), 0, 'L', 0); $pdf->SetXY(40, 239); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'หนังสือรับรอง'), 0, 'L', 0); $pdf->SetXY(40, 246); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'นามบัตร(ถ้ามี)'), 0, 'L', 0); $pdf->SetXY(40, 253); //g9k1s = ทั่วไป , kki22 = วิสามัญ , x9fkq = สามัญ if ($rowMember['register_level'] == 'g9k1s') { $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ค่าบำรุง/ปี 399 บาท'), 0, 'L', 0); } else if ($rowMember['register_level'] == 'kki22') { $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ค่าบำรุง/ปี 3,000 บาท'), 0, 'L', 0); } if ($rowMember['register_level'] == 'x9fkq') { $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'ค่าบำรุง/ปี 5,000 บาท'), 0, 'L', 0); } $pdf->Image('square.png', 34, 232, 5, 5, 'PNG'); $pdf->Image('square.png', 34, 239, 5, 5, 'PNG'); $pdf->Image('square.png', 34, 246, 5, 5, 'PNG'); $pdf->Image('square.png', 34, 253, 5, 5, 'PNG'); $pdf->SetXY(17, 274); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'สมาคมผู้ประกอบการนำคนต่างด้าวมาทำงานในประเทศ(ประเทศไทย)'), 0, 'L', 0); $pdf->SetXY(17, 280); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', '59/28 ม.8 ต.ท่าทราย อ.เมืองสมุทรสาคร จ.สมุทรสาคร 74000 โทร.034-112568'), 0, 'L', 0); $pdf->SetXY(17, 286); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'LINE Official Account : @efa.thailand , E-mail : efa.thailand@gmail.com'), 0, 'L', 0); /// QR Code $pdf->Image('qrcode/' . $qr_code_id . '.png', 170, 265, 20, 20, 'PNG'); $pdf->SetXY(170.5, 285); $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'จรรยาบรรณ'), 0, 'L', 0); // // ไฟล์ที่ได้รับอนุญาติ // $allowed = array("png", "jpg", "jpeg", "PNG", "JPG", "JPEG"); // // เช็คว่า เป็น Jpg , Png , Jpeg // $document_file1 = $row['document_file1']; // $end_document_file1 = end(explode(".", $document_file1)); // if (in_array(strtolower($end_document_file1), $allowed)) { // $pdf->AddPage(); // $pdf->Image("../upload/join/file/" . $document_file1, 0, 0, 210, 297, $end_document_file1); //เอกสารประกอบการสมัคร // // if (!empty($row['member_signature'])) { // // $pdf->Image($sig_img, 123, 239, 70, 20, 'PNG'); // // $watermark = '../upload/join/file/watermark.png'; // // $pdf->Image($watermark, 0, 0, 210, 297, 'PNG'); // // $pdf->SetXY(140, 260); // // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'สำเนาถูกต้อง'), 0, 'L', 0); // // $pdf->SetXY(125, 268); // // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', '(.........................................................)'), 0, 'L', 0); // // $pdf->SetXY(131, 267); // ในวงเล็บ // // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['member_name']), 0, 'L', 0); // // } // } // // เช็คว่า เป็น Jpg , Png , Jpeg // $document_file2 = $row['document_file2']; // $end_document_file2 = end(explode(".", $document_file2)); // if (in_array(strtolower($end_document_file2), $allowed)) { // $pdf->AddPage(); // $pdf->Image("../upload/join/file/" . $document_file2, 0, 0, 210, 297, $end_document_file2); //เอกสารประกอบการสมัคร // // if (!empty($row['member_signature'])) { // // $pdf->Image($sig_img, 123, 239, 70, 20, 'PNG'); // // $watermark = '../upload/join/file/watermark.png'; // // $pdf->Image($watermark, 0, 0, 210, 297, 'PNG'); // // $pdf->SetXY(140, 260); // // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'สำเนาถูกต้อง'), 0, 'L', 0); // // $pdf->SetXY(125, 268); // // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', '(.........................................................)'), 0, 'L', 0); // // $pdf->SetXY(131, 267); // ในวงเล็บ // // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['member_name']), 0, 'L', 0); // // } // } // // เช็คว่า เป็น Jpg , Png , Jpeg // $document_file3 = $row['document_file3']; // $end_document_file3 = end(explode(".", $document_file3)); // if (in_array(strtolower($end_document_file3), $allowed)) { // $pdf->AddPage(); // $pdf->Image("../upload/join/file/" . $document_file3, 0, 0, 210, 297, $end_document_file3); //เอกสารประกอบการสมัคร // // if (!empty($row['member_signature'])) { // // $pdf->Image($sig_img, 123, 239, 70, 20, 'PNG'); // // $watermark = '../upload/join/file/watermark.png'; // // $pdf->Image($watermark, 0, 0, 210, 297, 'PNG'); // // $pdf->SetXY(140, 260); // // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', 'สำเนาถูกต้อง'), 0, 'L', 0); // // $pdf->SetXY(125, 268); // // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', '(.........................................................)'), 0, 'L', 0); // // $pdf->SetXY(131, 267); // ในวงเล็บ // // $pdf->MultiCell(0, 5, iconv('UTF-8', 'cp874', $row['member_name']), 0, 'L', 0); // // } // } // $document_import = $row['document_import']; // if (!empty($document_import)) { // $pdf = new \setasign\Fpdi\Fpdi(); // // Set the source PDF file // $sourcePdf = "../upload/join/file/" . $document_import; // Provide the path to your existing PDF file // // Import the existing PDF file // $pageCount = $pdf->setSourceFile($sourcePdf); // // Iterate through each page of the source PDF and add it to the new PDF // for ($pageNumber = 1; $pageNumber <= $pageCount; $pageNumber++) { // $templateId = $pdf->importPage($pageNumber); // $pdf->AddPage(); // $pdf->useTemplate($templateId); // } // } $pdf->Output();