#9569 สร้าง เอกสารสมัครงาน ของเมนู รายชื่อผู้ฝากประวัติ (คืบหน้า 20%)

#9569 สร้าง เอกสารสมัครงาน ของเมนู รายชื่อผู้ฝากประวัติ (คืบหน้า 20%)
parent 26c929b2
......@@ -13,6 +13,30 @@
<%@ page import="com.csc.library.databean.Simmdropresumewithgson" %>
<%@ page import="com.csc.library.database.MyHashMap" %>
<%@ page import="com.csc.library.utilities.gsonmapping.*" %>
<%@page import="com.csc.library.utility.DHMConvert" %>
<%@page import="java.util.ArrayList" %>
<%@page import="java.util.Iterator" %>
<%@page import="java.util.Vector" %>
<%@page import="java.util.*" %>
<%@page import="com.csc.library.report.ReportUDF" %>
<%@page import="javax.servlet.jsp.jstl.sql.Result" %>
<%@page import="java.io.FileOutputStream" %>
<%@page import="java.io.OutputStream" %>
<%@page import="java.net.URLDecoder" %>
<%@page import="java.text.DecimalFormat" %>
<%@page import="java.net.URLEncoder" %>
<%@page import="java.util.HashMap" %>
<%@page import="java.text.SimpleDateFormat" %>
<%@page import="java.util.Locale" %>
<%@page import="java.util.Date" %>
<%@page import="java.util.GregorianCalendar" %>
<%@page import="com.csc.library.database.DataSet" %>
<%@page import="com.csc.library.session.InitialRecord" %>
<%@page import="com.csc.library.session.DbRecord" %>
<%@page import="com.csc.library.session.InitialEnvironment" %>
<%@page import="java.io.File" %>
<%@page import="org.json.JSONArray" %>
<%@page import="org.json.JSONObject" %>
<jsp:useBean id="DropResumePrint" class="com.csc.library.system.Task" scope="page"/>
<!DOCTYPE html>
<html>
......@@ -35,7 +59,7 @@ Not found data
screen.process();
ByteArrayOutputStream baos = new ByteArrayOutputStream();//72
Document document = new Document(PageSize.A4, 50, 50, 30, 36);
Document document = new Document(PageSize.A4, 20, 20, 20, 20);
float[] sizeColumn = new float[]{};
PdfWriter.getInstance(document, baos);
......@@ -53,8 +77,11 @@ Not found data
//fontHead.setStyle(Font.BOLD);
Font fontContent = new Font(bfHead, 11);
Font fontBoldContent = new Font(bfHead, 11, Font.BOLD);
Font fontTitle = new Font(bfHead, 20, Font.BOLD);
fontTitle.setStyle(Font.BOLD);
Font font20B = new Font(bfHead, 20, Font.BOLD);
Font font14N = new Font(bf, 14);
Font font14B = new Font(bf, 14, Font.BOLD);
Font font12N = new Font(bf, 12);
Font font12B = new Font(bf, 12, Font.BOLD);
Font fontAwesome = new Font(bfWithFontAWesome, 10);
// set vlign middle
......@@ -437,7 +464,7 @@ Not found data
// setPaddingTop(0.5f);
// setPaddingLeft(0.0f);
// setPaddingRight(0.0f);
// detail.addCell( getCellData("Lesson Plan", fontTitle, true, "LEFT", "MIDDLE", 1, 0) );
// detail.addCell( getCellData("Lesson Plan", font20B, true, "LEFT", "MIDDLE", 1, 0) );
//
// String defaultFile = "default.png";
// String filename = screen.getString("MCOMPANY","logo");
......@@ -456,8 +483,8 @@ Not found data
// detail.addCell(cellDetail);
// --------------- Report Header -----------------
// --------------- new line -----------------
sizeColumn = new float[]{30.0f, 25.0f, 06.0f};
PdfPTable detail = new PdfPTable(3);
sizeColumn = new float[]{100.0f};
PdfPTable detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
PdfPCell cellDetail;
......@@ -466,76 +493,882 @@ Not found data
setPaddingLeft(0.0f);
setPaddingRight(0.0f);
cellDetail = new PdfPCell(new Phrase("DCC/Form:HRD/Issue No.3", fontHead));
cellDetail.setPadding(padding);
cellDetail.setPaddingTop(paddingtop);
cellDetail.setPaddingLeft(paddingleft);
cellDetail.setHorizontalAlignment(Element.ALIGN_LEFT);
cellDetail.setVerticalAlignment(Element.ALIGN_MIDDLE);
cellDetail.setBorder(Rectangle.NO_BORDER);
detail.addCell(cellDetail);
cellDetail = new PdfPCell(new Phrase("", fontAwesome));
cellDetail.setPadding(padding);
cellDetail.setPaddingTop(paddingtop);
cellDetail.setPaddingLeft(paddingleft);
cellDetail.setHorizontalAlignment(Element.ALIGN_LEFT);
cellDetail.setVerticalAlignment(Element.ALIGN_MIDDLE);
cellDetail.setBorder(Rectangle.NO_BORDER);
detail.addCell(cellDetail);
detail.addCell(getCellData("PR-710-007 / Revision No. : 01", font12N, "NO", "RIGHT", "TOP", 0, 0));
detail.addCell(getCellData("Effective Date : 12/05/09", font12N, "NO", "RIGHT", "TOP", 0, 0));
setPaddingTop(30.5f);
cellDetail = new PdfPCell(new Phrase("HRD-FM034", fontHead));
cellDetail.setPadding(padding);
cellDetail.setPaddingTop(paddingtop);
cellDetail.setHorizontalAlignment(Element.ALIGN_CENTER);
cellDetail.setVerticalAlignment(Element.ALIGN_MIDDLE);
cellDetail.setBorder(Rectangle.NO_BORDER);
detail.addCell(cellDetail);
detail.addCell(getCellData("ใบสมัครงาน", font20B, "NO", "CENTER", "TOP", 0, 0));
setPaddingTop(10.5f);
detail.addCell(getCellData("รหัสใบสมัคร"+".....................", font12N, "NO", "RIGHT", "TOP", 0, 0));
setPaddingTop(0.5f);
detail.addCell(getCellData("วันที่รับสมัคร"+".....................", font12N, "NO", "RIGHT", "TOP", 0, 0));
detail.addCell(getCellData("แหล่งที่ทราบข่าว"+".....................", font12N, "NO", "RIGHT", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{95.0f, 5.0f};
detail = new PdfPTable(2);
detail.setWidthPercentage(100);
sizeColumn = new float[]{15.0f,15.0f,70.0f};
detail = new PdfPTable(3);
detail.setWidthPercentage(90);
detail.setWidths(sizeColumn);
setPaddingTop(1.0f);
setPaddingTop(0.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(4.5f);
detail.addCell(getCellData("ผู้ผลิต และผู้แทนจำหน่าย เครื่องเขียน กระดาษ วัสดุอุปกรณ์สำนักงาน และช่างเขียน", font14B, "NO", "LEFT", "TOP", 3, 0));
detail.addCell(getCellData("สำนักงานสุรวงศ์", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("เลขที่ 210", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ถ.สุรวงศ์ บางรัก กรุงเทพฯ 10500 โทร. 0-2237-0500 โทรสาร 0-2236-9703", font12N, "NO", "LEFT", "TOP", 0, 0));
cellDetail = new PdfPCell(new Phrase(" ", fontHead));
cellDetail.setPadding(padding);
cellDetail.setPaddingTop(paddingtop);
cellDetail.setPaddingLeft(paddingleft);
cellDetail.setHorizontalAlignment(Element.ALIGN_LEFT);
cellDetail.setVerticalAlignment(Element.ALIGN_MIDDLE);
cellDetail.setBorder(Rectangle.NO_BORDER);
detail.addCell(cellDetail);
detail.addCell(getCellData("โรงงานนวนคร", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("เลขที่ 101/27", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("นิคมอุตสาหกรรม นวนคร โครงการ 1 ต.คลองหนึ่ง อ.คลองหลวง จ.ปทุมธานี 12120 โทร. 0-2529-4747", font12N, "NO", "LEFT", "TOP", 0, 0));
cellDetail = new PdfPCell(new Phrase("p.1/2", fontHead));
cellDetail.setPadding(padding);
cellDetail.setPaddingTop(paddingtop);
detail.addCell(getCellData("โรงงานโรจนะ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("เลขที่ 21/11 หมูที่9", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("สวนอุตสาหกรรมโรจนะ ต.านหาม อ.อุทัย จ.พระนครศรีอยุธยา 13210 โทร. 035-746-500-18", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("DC2(โรงงาน 2 เดิม)", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("เลขที่ 60/67", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("นิคมอุตสาหกรรม นวนคร โครงการ 2 ต.คลองหนึ่ง อ.คลองหลวง จ.ปทุมธานี 12120 โทร. 0-2529-1732", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ศูนย์คลังสินค้าและบริการ เลขที่ 94 หมู่ที่ 15 ต.บางพลีใหญ่ อ.บางพลี จ.สมุทรปราการ 10540 โทร. 0-2750-1540", font12N, "NO", "LEFT", "TOP", 3, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{10.0f,90.0f};
detail = new PdfPTable(2);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(0.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(0.5f);
detail.addCell(getCellData("คำแนะนำ :", font14N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ขอให้ผู้สมัครอ่านและทำความเข้าใจข้อความแต่ละข้ออย่างละเอียดก่อนที่จะกรอกข้อความใดๆ ลงไปในช่องว่างนั้นๆ หากปรากฏว่าผู้สมัครปกปิดความจริง", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("หรือมีเจตนาแจ้งข้อความเท็จจริง จะส่งผลให้ผู้สมัครหมดสิทธิ์ได้รับพิจารณาเข้าทำงานกับบริษัทฯ หรืออาจถูกเลิกจ้างในภายหลัง โดยไม่จ่ายค่าชดเชยใดๆทั้งสิ้น", font12N, "NO", "LEFT", "TOP", 2, 0));
detail.addCell(getCellData(" ", font14N, "NO", "LEFT", "TOP", 2, 0));
setPaddingBottom(0.5f);
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{20.0f,20.0f,20.0f,20.0f,20.0f};
detail = new PdfPTable(5);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(3.5f);
detail.addCell(getCellData("ตำแหน่งที่สมัคร", font14N, "", "CENTER", "MIDDLE", 2, 0));
detail.addCell(getCellData("เงินเดือนที่ต้องการ", font14N, "", "CENTER", "TOP", 2, 0));
//IMAGE
img = Image.getInstance(getImagePath("RECRUIT_UPLOAD-dir","PICTURE/",simmapplicantwithgson.mdrop_resumePersonal.imgname,"DEFAULTPERSON.jpg"));
cellDetail = new PdfPCell(img, false);
img.scaleAbsolute(90f, 100f);
cellDetail.setHorizontalAlignment(Element.ALIGN_CENTER);
cellDetail.setVerticalAlignment(Element.ALIGN_MIDDLE);
cellDetail.setBorder(Rectangle.NO_BORDER);
cellDetail.setVerticalAlignment (Element.ALIGN_MIDDLE);
cellDetail.setColspan(3);
cellDetail.setRowspan(7);
detail.addCell(cellDetail);
detail.addCell(getCellData("1.", font14N, "", "LEFT", "TOP", 2, 0));
detail.addCell(getCellData("บาท", font14N, "", "RIGHT", "TOP", 2, 0));
detail.addCell(getCellData("ประวัติส่วนตัว", font14N, "", "CENTER", "TOP", 4, 0));
String prefix = simmapplicantwithgson.mdrop_resumePersonal.prefixid;
Chunk Chu4 = new Chunk("ชื่อ-สกุล (",font12N);
Chunk Chu0 = new Chunk("/",font12N);
Chunk Chu1 = new Chunk("นาย",font12N);
Chunk Chu2 = new Chunk("นาง",font12N);
Chunk Chu3 = new Chunk("น.ส.)",font12N);
if(prefix.equalsIgnoreCase("01")){
Chu1.setUnderline(0.1f, -2f);
}
else if(prefix.equalsIgnoreCase("02")){
Chu2.setUnderline(0.1f, -2f);
}
else if(prefix.equalsIgnoreCase("03")){
Chu3.setUnderline(0.1f, -2f);
}
content = new Phrase();
content.add(Chu4);
content.add(Chu1);
content.add(Chu0);
content.add(Chu2);
content.add(Chu0);
content.add(Chu3);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.fname.tha, font14N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("นามสกุล", font14N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.lname.tha, font14N, "NO", "LEFT", "TOP", 0, 0));
Chu4 = new Chunk("Name (",font12N);
Chu0 = new Chunk("/",font12N);
Chu1 = new Chunk("Mr.",font12N);
Chu2 = new Chunk("Mrs.",font12N);
Chu3 = new Chunk("Ms.)",font12N);
if(prefix.equalsIgnoreCase("01")){
Chu1.setUnderline(0.1f, -2f);
}
else if(prefix.equalsIgnoreCase("02")){
Chu2.setUnderline(0.1f, -2f);
}
else if(prefix.equalsIgnoreCase("03")){
Chu3.setUnderline(0.1f, -2f);
}
content = new Phrase();
content.add(Chu4);
content.add(Chu1);
content.add(Chu0);
content.add(Chu2);
content.add(Chu0);
content.add(Chu3);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.fname.eng, font14N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("SURNAME", font14N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.lname.eng, font14N, "NO", "LEFT", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{20.0f,20.0f,20.0f,20.0f,20.0f};
detail = new PdfPTable(5);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(3.5f);
detail.addCell(getCellData("วัน/เดือน/ปีที่เกิด", font14N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("อายุ", font14N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("สัญชาติ", font14N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ส่วนสูง", font14N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("น้ำหนัก", font14N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData(new CscCalendar(simmapplicantwithgson.mdrop_resumePersonal.birthdate.substring(0, 10)).getThaiDDMMYYYY().replaceAll("-","/"), font14N, "", "CENTER", "TOP", 1, 1,true,false));
detail.addCell(getCellData(age_memployee.substring(0,2), font14N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData(nationalityDesc, font14N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.height, font14N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.weight, font14N, "", "CENTER", "TOP", 0, 0));
setPaddingBottom(0.5f);
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{20.0f,10.0f,10.0f,10.0f,10.0f,10.0f};
detail = new PdfPTable(6);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(0.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(0.5f);
detail.addCell(getCellData("บัตรประจำตัวประชาชนเลขที่", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("วันที่ออกบัตร", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("วันที่หมดอายุ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{13.0f,5.0f,17.0f,2.0f,10.0f,2.0f,12.0f,2.0f,10.0f};
detail = new PdfPTable(9);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(0.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(0.5f);
detail.addCell(getCellData("เลขประจำตัวผู้เสียภาษี", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("(เฉพาะเพศชาย) สถานภาพทางทหาร", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("[]", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ผ่านการเกณฑ์ทหาร", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("[]", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ยังไม่ผ่านการเกณฑ์ทหาร", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("[]", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ได้รับการยกเว้น / รด.", font12N, "NO", "LEFT", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{20.0f,10.0f,10.0f,10.0f,10.0f,10.0f};
detail = new PdfPTable(6);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(0.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(0.5f);
detail.addCell(getCellData("ชื่อโรงพยาบาลที่ระบุในบัตรรับรองสิทธิ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("วันที่ออกบัตร", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("วันที่หมดอายุ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData(" ", font12N, "NO", "LEFT", "TOP", 6, 0));
setPaddingBottom(0.5f);
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("การติดต่อกับผู้สมัครงาน", font14B, "", "CENTER", "MIDDLE", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{20.0f,10.0f,10.0f,10.0f};
detail = new PdfPTable(4);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(0.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(4.5f);
setPaddingBottom(0.5f);
detail.addCell(getCellData("ที่อยู่ปัจจุบัน", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
detail.addCell(getCellData(sb.toString(), font12N, "NO", "LEFT", "MIDDLE", 3, 0));
detail.addCell(getCellData("โทรศัพท์บ้าน", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
detail.addCell(getCellData("โทรศัพท์มือถือ", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
detail.addCell(getCellData("ที่อยู่ตามทะเบียนบ้าน", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
detail.addCell(getCellData(sc.toString(), font12N, "NO", "LEFT", "MIDDLE", 3, 0));
detail.addCell(getCellData("โทรศัพท์", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "MIDDLE", 3, 0));
setPaddingBottom(0.5f);
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("บุคคลที่บริษัทฯ สามารถติดต่อ กรณีฉุกเฉิน", font14B, "", "CENTER", "MIDDLE", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{20.0f,10.0f,10.0f,10.0f,10.0f,10.0f,10.0f,10.0f};
detail = new PdfPTable(8);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(0.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(0.5f);
detail.addCell(getCellData("1.ชื่อ-สกุล", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ความสัมพันธ์", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("อาชีพ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("โทรศัพท์", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ที่อยู่/ติดต่อ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 7, 0));
detail.addCell(getCellData("2.ชื่อ-สกุล", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ความสัมพันธ์", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("อาชีพ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("โทรศัพท์", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ที่อยู่/ติดต่อ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 7, 0));
setPaddingBottom(0.5f);
document.add(detail);
// PAGE 2
document.newPage();
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("ประวัติทั่วไป", font14B, "", "CENTER", "MIDDLE", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("พี่น้องรวมทั้งหมด", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{10.0f,20.0f,5.0f,15.0f,15.0f,10.0f};
detail = new PdfPTable(6);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("ลำดับ", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ชื่อสกุล", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("อายุ", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("อาชีพ / ตำแหน่ง", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("สถานที่ทำงาน / ติดต่อ", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("โทรศัพท์", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("บิดา", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData(".", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("มารดา", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData(".", font12N, "", "CENTER", "TOP", 0, 0));
for(int num=1;num<6;num++){
detail.addCell(getCellData("[]พี่ []น้อง", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData(".", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("บริษัท อำพลฟูดส์ โพรเซลซิ่ง จำกัด", fontTitle, true, "CENTER", "BOTTOM", 0, 0));
}
setPaddingBottom(0.5f);
document.add(detail);
// --------------- new line -----------------
String personal_status = simmapplicantwithgson.mdrop_resumePersonal.status;
sizeColumn = new float[]{15.0f,15.0f,15.0f,15.0f,15.0f,15.0f};
detail = new PdfPTable(6);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("สถานภาพสมรส", font14B, "NO", "CENTER", "TOP", 0, 0));
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" โสด",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("M")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" สมรส(จดทะเบียน)",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("E")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" สมรส(ไม่จดทะเบียน)",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) ); Chu0 = new Chunk(personal_status.equalsIgnoreCase("M")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu0 = new Chunk(personal_status.equalsIgnoreCase("W")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" หม้าย",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("D")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" หย่า",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{20.0f,10.0f,10.0f,10.0f,10.0f,10.0f};
detail = new PdfPTable(6);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(0.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(0.5f);
detail.addCell(getCellData("ชื่อสามี / ภรรยา", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("อายุ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ปี อาชีพ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("../../..", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("สถานที่ทำงาน / ที่ติดต่อ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "LEFT", "TOP", 3, 0));
detail.addCell(getCellData("โทรศัพท์", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("..", font12N, "NO", "LEFT", "TOP", 0, 0));
setPaddingBottom(0.5f);
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{20.0f,10.0f,10.0f,10.0f,10.0f,10.0f};
detail = new PdfPTable(6);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(0.0f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(0.5f);
detail.addCell(getCellData("จำนวนบุตร", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...คน", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ศึกษา", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("..คน", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ไม่ศึกษา", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("..คน", font12N, "NO", "LEFT", "TOP", 0, 0));
setPaddingBottom(0.5f);
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("ประวัติการศึกษา", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{10.0f,15.0f,10.0f,10.0f,15.0f,10.0f,10.0f};
detail = new PdfPTable(7);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(3.5f);
detail.addCell(getCellData("ระดับวุฒิ", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("สถาบันการศึกษา", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("จากเดือน/ปี", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ถึงเดือน/ปี", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("คณะ/ภาควิชา", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("สาขา", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("เกรด", font12B, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ปริญญาโท", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ปริญญาตรี", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ปวช. / ปวส.", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ม.3/ม.6", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "", "CENTER", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{10.0f,15.0f,10.0f,10.0f,10.0f,15.0f,10.0f,10.0f,10.0f};
detail = new PdfPTable(9);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("ปัจจุบัน", font14B, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("กำลังศึกษาระดับวุฒิ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("สถาบัน", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("สาขา", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ปีที่เข้า", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{10.0f,15.0f,10.0f,10.0f,10.0f,15.0f,10.0f};
detail = new PdfPTable(7);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("ประวัติกิจกรรม", font14B, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("ระดับการศึกษา", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("กิจกรรม", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ตำแหน่งกิจกรรม", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{10.0f,15.0f,10.0f,10.0f};
detail = new PdfPTable(4);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("หน้าที่/ความรับผิดชอบ", font14B, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("ช่วงเวลาที่ทำกิจกรรม", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("งานอดิเรก", font14B, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("กีฬาที่ถนัด", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{15.0f,15.0f,10.0f,5.0f,15.0f,5.0f,10.0f};
detail = new PdfPTable(7);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("ความสามารถพิเศษ", font14B, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("พิมพ์ดีดไทย", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("คำ/นาที พิมพ์ดีดอังกฤษ", font12N, "NO", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("...", font12N, "NO", "CENTER", "TOP", 0, 0));
detail.addCell(getCellData("คำ/นาที", font12N, "NO", "LEFT", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{10.0f,90.0f};
detail = new PdfPTable(2);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("คอมพิวเตอร์", font14B, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("(ระบุโปรแกรมสำเร็จรูปที่ใช้ได้ / ภาษาคอมพิวเตอร์ที่เขียนได้)", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{12.5f,12.5f,12.5f,12.5f,15.5f,12.5f,12.5f,12.5f};
detail = new PdfPTable(8);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" Window",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" MS-Word",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" MS-Excel",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" MS-Access",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" MS-Power Point",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" OfficeTie",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" Linux",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" JAVA,HTML",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" PhotoShop",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" อื่นๆ (โปรดระบุ)" + "...",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 7, 1) );
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{20.0f,20.0f,20.0f,20.0f,20.0f};
detail = new PdfPTable(5);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("รถยนต์", font14B, "NO", "LEFT", "TOP", 0, 0));
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" ขับได้",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" ขับไม่ได้",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" มีรถ",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" ไม่มีรถ",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
document.add(detail);
detail.addCell(getCellData("รถจักรยานยนต์", font14B, "NO", "LEFT", "TOP", 0, 0));
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" ขับได้",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" ขับไม่ได้",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" มีรถ",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
Chu0 = new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
Chu1 = new Chunk(" ไม่มีรถ",font12N);
content = new Phrase();
content.add(Chu0);
content.add(Chu1);
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
document.add(detail);
// --------------- new line -----------------
String[] level = {" ดีมาก ", " ดี ", " ปานกลาง ", " พอใช้"};
String[] langSkill = {"ภาษาอังกฤษ", "ภาษาจีนกลาง", "...", "..."};
sizeColumn = new float[]{15.0f,30.0f,30.0f,30.0f};
detail = new PdfPTable(4);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("ทักษะทางภาษา", font14B, "", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("พูด", font14B, "", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("อ่าน", font14B, "", "LEFT", "TOP", 0, 0));
detail.addCell(getCellData("เขียน", font14B, "", "LEFT", "TOP", 0, 0));
for(int num=0;num < 4;num++ ){
detail.addCell(getCellData(langSkill[num], font14B, "", "LEFT", "TOP", 0, 0));
content = new Phrase();
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[0],font12N));
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[1],font12N));
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[2],font12N));
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[3],font12N));
detail.addCell(getCellData2( content, "", "LEFT", "MIDDLE", 1, 1) );
content = new Phrase();
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[0],font12N));
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[1],font12N));
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[2],font12N));
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[3],font12N));
detail.addCell(getCellData2( content, "", "LEFT", "MIDDLE", 1, 1) );
content = new Phrase();
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[0],font12N));
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[1],font12N));
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[2],font12N));
content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
content.add(new Chunk(level[3],font12N));
detail.addCell(getCellData2( content, "", "LEFT", "MIDDLE", 1, 1) );
}
document.add(detail);
// PAGE 3
document.newPage();
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(2.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(5.5f);
detail.addCell(getCellData("ประวัติการทำงาน (ให้ระบุที่ทำงานแห่งแรกถึงที่ทำงานปัจจุบันตามลำดับ)", font14B, "", "CENTER", "MIDDLE", 0, 0));
setPaddingTop(0.5f);
setPaddingBottom(2.5f);
for(int num=0;num < 3;num++ ){
detail.addCell(getCellData("บริษัท", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("โทรศัพท์", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("เริ่ม", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("สาเหตุที่ลาออก", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
}
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("อธิบายลักษณะงานที่เคยทำผ่านมา / ลักษณะงานที่ทำได้", font14B, "", "CENTER", "MIDDLE", 0, 0));
for(int num=0;num < 9;num++ ){
detail.addCell(getCellData(String.valueOf(num+1) + "...........", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
}
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{40.0f,20.0f,20.0f,20.0f};
detail = new PdfPTable(4);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("ประวัติการฝึกอบรม", font14B, "", "CENTER", "MIDDLE", 0, 0));
detail.addCell(getCellData("สถาบันที่จัดฝึกอบรม", font14B, "", "CENTER", "MIDDLE", 0, 0));
detail.addCell(getCellData("ปี พ.ศ.", font14B, "", "CENTER", "MIDDLE", 0, 0));
detail.addCell(getCellData("ระยะเวลา", font14B, "", "CENTER", "MIDDLE", 0, 0));
for(int num=0;num < 5;num++ ){
detail.addCell(getCellData(String.valueOf(num+1) + "...........", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("...........", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("...........", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("...........", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
}
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{40.0f,20.0f,20.0f,20.0f};
detail = new PdfPTable(4);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(3.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(6.5f);
detail.addCell(getCellData("บุคคลที่อ้างอิง (ให้ระบุบุคคลที่ไม่ใช่ญาติพี่น้อง หรือนายจ้างเดิม ซึ่งสามารถสอบถามและให้คำรับรองได้)", font14B, "", "CENTER", "MIDDLE", 4, 0));
detail.addCell(getCellData("ชื่อ-สกุล", font14B, "", "CENTER", "MIDDLE", 0, 0));
detail.addCell(getCellData("ความสัมพันธ์", font14B, "", "CENTER", "MIDDLE", 0, 0));
detail.addCell(getCellData("อาชีพ", font14B, "", "CENTER", "MIDDLE", 0, 0));
detail.addCell(getCellData("ที่ติดต่อ / โทรศัพท์", font14B, "", "CENTER", "MIDDLE", 0, 0));
for(int num=0;num < 4;num++ ){
detail.addCell(getCellData(String.valueOf(num+1) + "...........", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("...........", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("...........", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
detail.addCell(getCellData("...........", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
}
document.add(detail);
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
setPaddingTop(0.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(0.5f);
content = new Phrase();
content.add(new Chunk("ข้อมูลเพิ่มเติม ",font14B));
content.add(new Chunk("ให้ผู้สมัครงานกรอกเพื่อให้บริษัทฯ รู้จักท่านดียิ่งขึ้น รวมถึงการแสดงความสามารถอื่น ที่จะก่อให้เกิดประโยชน์ต่อการสมัครงานครั้งนี้ อาทิ",font12N));
detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE", 1, 1) );
detail.addCell(getCellData("ความสำเร็จที่ผ่านมา หรือลักษณะงานหรือลักษณะงาน ความรู้หรือความสามารถพิเศษที่เกี่ยวข้องกับงาน ซึ่งท่านถนัดและสนใจมากที่สุด", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
document.add(detail);
/* // --------------- new line -----------------
sizeColumn = new float[]{44.0f, 35.0f, 21.0f};
detail = new PdfPTable(3);
detail.setWidthPercentage(100);
......@@ -2266,7 +3099,7 @@ Not found data
cellDetail.setBorder(Rectangle.RIGHT | Rectangle.BOTTOM);
detail.addCell(cellDetail);
document.add(detail);
// --------------- new line -----------------
*/ // --------------- new line -----------------
} catch (Exception e) {
e.printStackTrace();
......@@ -2311,12 +3144,15 @@ Not found data
Float paddingright = 0.0f;
BaseColor basecolor = new BaseColor(0, 0, 0);
private PdfPCell getCellData(String text, Font font, boolean noborder, String horalign, String veralign, int colspan, int rowspan) {
return getCellData(text, font, noborder, horalign, veralign, colspan, rowspan, false);
private PdfPCell getCellData(String text, Font font, String noborder, String horalign, String veralign, int colspan, int rowspan) {
return getCellData(text, font, noborder, horalign, veralign, colspan, rowspan, false,false);
}
private PdfPCell getCellData(String text, Font font, boolean noborder, String horalign, String veralign, int colspan, int rowspan, boolean bgcolor) {
//get call data
private PdfPCell getCellData(String text, Font font, String noborder, String horalign, String veralign, int colspan, int rowspan,boolean setheight, boolean bgcolor) {
PdfPCell cellDetail = new PdfPCell(new Phrase(text, font));
cellDetail.setNoWrap(false);
// cellDetail.setNoWrap(true);
if (horalign.equalsIgnoreCase("LEFT")) {
cellDetail.setHorizontalAlignment(Element.ALIGN_LEFT);
......@@ -2355,16 +3191,153 @@ Not found data
if (rowspan > 0) {
cellDetail.setRowspan(rowspan);
}
if (noborder) {
if (noborder.equalsIgnoreCase("NO")) {
cellDetail.setBorder(Rectangle.NO_BORDER);
}
else if(noborder.equalsIgnoreCase("R_TOP")){
cellDetail.setBorder(Rectangle.TOP );
}
else if(noborder.equalsIgnoreCase("R_TL")){
cellDetail.setBorder(Rectangle.TOP | Rectangle.LEFT);
}
else if(noborder.equalsIgnoreCase("R_TR")){
cellDetail.setBorder(Rectangle.TOP | Rectangle.RIGHT);
}
else if(noborder.equalsIgnoreCase("R_LR")){
cellDetail.setBorder(Rectangle.LEFT | Rectangle.RIGHT);
}
else if(noborder.equalsIgnoreCase("R_RB")){
cellDetail.setBorder(Rectangle.RIGHT | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_TB")){
cellDetail.setBorder(Rectangle.TOP | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_TLR")){
cellDetail.setBorder(Rectangle.TOP | Rectangle.LEFT | Rectangle.RIGHT);
}
else if(noborder.equalsIgnoreCase("R_LRB")){
cellDetail.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_TLB")){
cellDetail.setBorder(Rectangle.TOP | Rectangle.LEFT | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_TRB")){
cellDetail.setBorder(Rectangle.TOP | Rectangle.RIGHT | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_BOTTOM")){
cellDetail.setBorder(Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_RIGHT")){
cellDetail.setBorder(Rectangle.RIGHT);
}
else if(noborder.equalsIgnoreCase("R_LEFT")){
cellDetail.setBorder(Rectangle.LEFT);
}
else{
}
if (bgcolor) {
cellDetail.setBackgroundColor(basecolor);
}
if (setheight) {
cellDetail.setFixedHeight(0.6999512f);
}
return cellDetail;
}
//CellDeatail2 Use For Add Chunk(1row 2 Fonts Or Color)
private PdfPCell getCellData2(Phrase content, String noborder, String horalign, String veralign, int colspan, int rowspan) {
return getCellData2(content, noborder, horalign, veralign, colspan, rowspan, false, false);
}
private PdfPCell getCellData2(Phrase content, String noborder, String horalign, String veralign, int colspan, int rowspan,boolean setheight, boolean bgcolor) {
PdfPCell cellDetail2 = new PdfPCell(new Phrase(content));
LineDash solid = new SolidLine();
LineDash dotted = new DottedLine();
LineDash dashed = new DashedLine();
if (horalign.equalsIgnoreCase("LEFT")) {
cellDetail2.setHorizontalAlignment(Element.ALIGN_LEFT);
} else if (horalign.equalsIgnoreCase("CENTER")) {
cellDetail2.setHorizontalAlignment(Element.ALIGN_CENTER);
} else if (horalign.equalsIgnoreCase("RIGHT")) {
cellDetail2.setHorizontalAlignment(Element.ALIGN_RIGHT);
}
if (veralign.equalsIgnoreCase("TOP")) {
cellDetail2.setVerticalAlignment(Element.ALIGN_TOP);
} else if (veralign.equalsIgnoreCase("MIDDLE")) {
cellDetail2.setVerticalAlignment(Element.ALIGN_MIDDLE);
} else if (veralign.equalsIgnoreCase("BOTTOM")) {
cellDetail2.setVerticalAlignment(Element.ALIGN_BOTTOM);
}
if (padding > 0.0f) {
cellDetail2.setPadding(padding);
}
if (paddingtop > 0.0f) {
cellDetail2.setPaddingTop(paddingtop);
}
if (paddingbottom > 0.0f) {
cellDetail2.setPaddingBottom(paddingbottom);
}
if (paddingleft > 0.0f) {
cellDetail2.setPaddingLeft(paddingleft);
}
if (paddingright > 0.0f) {
cellDetail2.setPaddingRight(paddingright);
}
if (colspan > 0) {
cellDetail2.setColspan(colspan);
}
if (rowspan > 0) {
cellDetail2.setRowspan(rowspan);
}
if (noborder.equalsIgnoreCase("NO")) {
cellDetail2.setBorder(Rectangle.NO_BORDER);
}
else if(noborder.equalsIgnoreCase("R_TR")){
cellDetail2.setBorder(Rectangle.TOP | Rectangle.RIGHT);
}
else if(noborder.equalsIgnoreCase("R_LR")){
cellDetail2.setBorder(Rectangle.LEFT | Rectangle.RIGHT);
}
else if(noborder.equalsIgnoreCase("R_RB")){
cellDetail2.setBorder(Rectangle.RIGHT | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_TB")){
cellDetail2.setBorder(Rectangle.TOP | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_TLR")){
cellDetail2.setBorder(Rectangle.TOP | Rectangle.LEFT | Rectangle.RIGHT);
}
else if(noborder.equalsIgnoreCase("R_LRB")){
cellDetail2.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_TLB")){
cellDetail2.setBorder(Rectangle.TOP | Rectangle.LEFT | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_TRB")){
cellDetail2.setBorder(Rectangle.TOP | Rectangle.RIGHT | Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_BOTTOM")){
cellDetail2.setBorder(Rectangle.BOTTOM);
}
else if(noborder.equalsIgnoreCase("R_BOTTOM_DOT")){
cellDetail2.setBorder(PdfPCell.NO_BORDER);
cellDetail2.setCellEvent(new CustomBorder(null, null, null, dotted));
}
else{
}
if (bgcolor) {
cellDetail2.setBackgroundColor(basecolor);
}
if (setheight) {
cellDetail2.setFixedHeight(0.6999512f);
}
return cellDetail2;
}
private void setPadding(Float padding) {
this.padding = padding;
}
......@@ -2389,6 +3362,86 @@ Not found data
this.basecolor = new BaseColor(r, g, b);
}
interface LineDash {
public void applyLineDash(PdfContentByte canvas);
}
class SolidLine implements LineDash {
public void applyLineDash(PdfContentByte canvas) { }
}
class DottedLine implements LineDash {
public void applyLineDash(PdfContentByte canvas) {
canvas.setLineCap(PdfContentByte.LINE_CAP_ROUND);
canvas.setLineDash(0,2,2);
}
}
class DashedLine implements LineDash {
public void applyLineDash(PdfContentByte canvas) {
canvas.setLineDash(3, 3);
}
}
class CustomBorder implements PdfPCellEvent {
protected LineDash left;
protected LineDash right;
protected LineDash top;
protected LineDash bottom;
public CustomBorder(LineDash left, LineDash right,
LineDash top, LineDash bottom) {
this.left = left;
this.right = right;
this.top = top;
this.bottom = bottom;
}
public void cellLayout(PdfPCell cell, Rectangle position,
PdfContentByte[] canvases) {
PdfContentByte canvas = canvases[PdfPTable.LINECANVAS];
if (top != null) {
canvas.saveState();
top.applyLineDash(canvas);
canvas.moveTo(position.getRight(), position.getTop());
canvas.lineTo(position.getLeft(), position.getTop());
canvas.stroke();
canvas.restoreState();
}
if (bottom != null) {
canvas.saveState();
bottom.applyLineDash(canvas);
canvas.moveTo(position.getRight(), position.getBottom());
canvas.lineTo(position.getLeft(), position.getBottom());
canvas.stroke();
canvas.restoreState();
}
if (right != null) {
canvas.saveState();
right.applyLineDash(canvas);
canvas.moveTo(position.getRight(), position.getTop());
canvas.lineTo(position.getRight(), position.getBottom());
canvas.stroke();
canvas.restoreState();
}
if (left != null) {
canvas.saveState();
left.applyLineDash(canvas);
canvas.moveTo(position.getLeft(), position.getTop());
canvas.lineTo(position.getLeft(), position.getBottom());
canvas.stroke();
canvas.restoreState();
}
}
}
// Add IMAGE IN PART
private String getImagePath(String type, String subFolder, String imageFileName, String defaultFile) {
InitialEnvironment inv = new InitialEnvironment("GLOBAL");
String path = inv.getValue(type)+subFolder;
if (!new File(path+imageFileName).exists() || imageFileName.equals(" ")){
imageFileName = defaultFile;
}
return path+imageFileName;
}
%>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment