DropResumePrintDHAS.jsp 147 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@page import="com.csc.library.report.ReportUDF" %>
<%@page import="java.io.OutputStream" %>
<%@page import="java.io.ByteArrayOutputStream" %>
<%@page import="java.util.GregorianCalendar" %>
<%@page import="com.csc.library.session.InitialInquiry" %>
<%@page import="com.csc.library.session.DbInquiry" %>
<%@page import="com.csc.library.entry.HelpEntry" %>
<%@page import="com.itextpdf.text.*" %>
<%@page import="com.itextpdf.text.pdf.*" %>
<%@page import="java.io.ByteArrayOutputStream" %>
<%@page import="com.csc.library.utilities.*" %>
<%@ page import="com.csc.library.databean.Simmdropresumewithgson" %>
<%@ page import="com.csc.library.database.MyHashMap" %>
<%@ page import="com.csc.library.utilities.gsonmapping.*" %>
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
<%@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" %>
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
<jsp:useBean id="DropResumePrint" class="com.csc.library.system.Task" scope="page"/>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Report</title>
</head>
<body>
Not found data
<%
    DropResumePrint.setChannel(request, response);
    HelpEntry screen = (HelpEntry) DropResumePrint.process("HelpEntry", "MDROP_RESUMEHELP");
    CheckNull chk = new CheckNull();

    String filter = "EMAIL = '" + chk.chkNullString(request.getParameter("email")) + "'";
//    filter = "1=2";

    screen.setMaxLine(1);
    screen.inq.setFilter(filter);
    screen.process();

    ByteArrayOutputStream baos = new ByteArrayOutputStream();//72
62
    Document document = new Document(PageSize.A4, 20, 20, 20, 20);
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
    float[] sizeColumn = new float[]{};

    PdfWriter.getInstance(document, baos);
    document.open();
    document.addTitle("Document Title");


    BaseFont bfWithFontAWesome = BaseFont.createFont(application.getRealPath("FONTS/FontAwesome.otf"), BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
    BaseFont bf = BaseFont.createFont(application.getRealPath("FONTS/Cordia.ttf"), BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
    BaseFont bfHead = BaseFont.createFont(application.getRealPath("FONTS/Cordia.ttf"), BaseFont.IDENTITY_H, BaseFont.EMBEDDED, true);
    Font font = new Font(bf, 11);
    Font fontTopic = new Font(bfHead, 20, Font.BOLD);
    Font fontHead = new Font(bfHead, 13, Font.BOLD);
    Font fontHeadWhiteColor = new Font(bfHead, 11, Font.BOLD, new BaseColor(255, 255, 255));
    //fontHead.setStyle(Font.BOLD);
    Font fontContent = new Font(bfHead, 11);
    Font fontBoldContent = new Font(bfHead, 11, Font.BOLD);
80 81 82 83 84
    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);
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
    Font fontAwesome = new Font(bfWithFontAWesome, 10);

    // set vlign middle
    Phrase content = new Phrase("Blah blah blah", font);
    Float fontSize = content.getFont().getSize();
    Float capHeight = content.getFont().getBaseFont().getFontDescriptor(BaseFont.CAPHEIGHT, fontSize);

    boolean hasData = false;
    if (screen.getInquiry().recCount() > 0) {
        hasData = true;
        screen.nextRec();
        screen.referLangOn();
        DbInquiry dbinq = null;
        int i = 0;

        Simmdropresumewithgson simmapplicantwithgson = (Simmdropresumewithgson) screen.inq.getCurrentDbRecord();
        //----------------------------mprefix------------------------------------

        String prefixTdesc = "";
        String prefixEdesc = "";

        DbInquiry inqmprefix = new InitialInquiry(screen.getUProfile()).getDbInquiry("mprefix");
        inqmprefix.setFilter("prefixid = '" + simmapplicantwithgson.mdrop_resumePersonal.prefixid + "'");
        inqmprefix.refresh();
        while (inqmprefix.next()) {
            prefixTdesc = inqmprefix.getString("tdesc");
            prefixEdesc = inqmprefix.getString("edesc");
        }

        //----------------------------END mprefix------------------------------------
115
        DecimalFormat DFO = new DecimalFormat("#,###,###.##");
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
        //----------------------------SET DATA Family------------------------------------
        MyHashMap familybackground = new MyHashMap();
        String[] masterrelations = {"01", "02", "03" ,"99"};
        String occupationDesc = "";
        String prefixTdesc_family = "";
        String line = "";
        int childtotal = 0;
        int relativetotal = 0;
        for (String relatationkey : masterrelations) {
            familybackground.put("prefix" + relatationkey, "");
            familybackground.put("fname" + relatationkey, "");
            familybackground.put("lname" + relatationkey, "");
            familybackground.put("age" + relatationkey, "");
            familybackground.put("occupation" + relatationkey, "");
            familybackground.put("position" + relatationkey, "");
            familybackground.put("status" + relatationkey, "");
            familybackground.put("workplace" + relatationkey, "");
            familybackground.put("phone" + relatationkey, "");
        }
135

136 137 138 139 140 141 142
        familybackground.putToSum("prefixallchild", "");
        familybackground.putToSum("nameallchild", "");
        familybackground.putToSum("ageallchild", "");
        familybackground.putToSum("occupationallchild", "");
        familybackground.putToSum("positionallchild", "");
        familybackground.putToSum("statusallchild", "");
        familybackground.putToSum("workplaceandphoneallchild", "");
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
        //set blank data in ประวัติทั่วไป พี่น้อง 5 บรรทัด
        for (int num = 0 ; num < 5 ;num++){
          familybackground.put("nameSiblings "+num, "");
          familybackground.put("ageSiblings "+num, "");
          familybackground.put("relationSiblings "+num, "00");  
          familybackground.put("occupationSiblings "+num, "");
          familybackground.put("positionSiblings "+num, "");
          familybackground.put("workplaceSiblings "+num, "");
          familybackground.put("phoneSiblings "+num, "");          
        }
        //Use For Count older,littel brother and ister
        familybackground.putToSum("relation05" , 0);
        familybackground.putToSum("relation06" , 0);
        familybackground.putToSum("relation07" , 0);
        familybackground.putToSum("relation08" , 0);
158 159 160 161 162 163 164 165 166 167 168 169

        DbInquiry inqoccupation = new InitialInquiry(screen.getUProfile()).getDbInquiry("moccupation");
        DbInquiry inqmprefix_family = new InitialInquiry(screen.getUProfile()).getDbInquiry("mprefix");

        String prefixallchild = "";
        String nameallchild = "";
        String ageallchild = "";
        String occupationallchild = "";
        String positionallchild = "";
        String statusallchild = "";
        String workplaceandphoneallchild = "";

170 171 172 173 174 175
        String nameSiblings  = "";
        String ageSiblings  = "";
        String occupationSiblings  = "";
        String positionSiblings  = "";
        String workplaceSiblings  = "";
        String phoneSiblings  = "";
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215

        for (Mdrop_resumeFamily.Family family : simmapplicantwithgson.mdrop_resumeFamily.family) {
            inqoccupation.setFilter("occid = '" + family.occupation+ "'");
            inqoccupation.refresh();
            inqmprefix_family.setFilter("prefixid = '" + family.prefixid + "'");
            inqmprefix_family.refresh();
            while (inqoccupation.next()) {
                occupationDesc = inqoccupation.getString("tdesc");
            }
            while (inqmprefix_family.next()) {
                prefixTdesc_family = inqmprefix_family.getString("tdesc");
            }
            familybackground.put("prefix" + family.relation,prefixTdesc_family);
            familybackground.put("fname" + family.relation, family.fname);
            familybackground.put("lname" + family.relation, family.lname);
            familybackground.put("age" + family.relation, family.age);
            familybackground.put("occupation" + family.relation, occupationDesc);
            familybackground.put("position" + family.relation, family.position);
            familybackground.put("status" + family.relation, family.status);
            familybackground.put("workplace" + family.relation, family.workplace);
            familybackground.put("phone" + family.relation, family.phone);


            if ("09,10,11,12,".indexOf(family.relation) > -1) {
                if (childtotal > 0) {
                    line = System.lineSeparator();
                }
                prefixallchild += line + prefixTdesc_family;
                nameallchild += line + family.fname + " " + family.lname;
                ageallchild += line + family.age;
                occupationallchild += line + occupationDesc;
                positionallchild += line + family.position;
                statusallchild += line + family.status;
                workplaceandphoneallchild += line + family.workplace + " " + family.phone;
                childtotal++;
            }
            if ("05,06,07,08,".indexOf(family.relation) > -1) {
                if (relativetotal > 0) {
                    line = System.lineSeparator();
                }
216 217 218 219 220 221 222 223 224 225 226

                familybackground.putToSum("relation" + family.relation, 1); // Count All Siblings

                familybackground.put("relationSiblings" + relativetotal, family.relation);
                familybackground.put("nameSiblings "+relativetotal, prefixTdesc_family+" "+family.fname + " " + family.lname );
                familybackground.put("ageSiblings "+relativetotal, family.age );
                familybackground.put("relationSiblings "+relativetotal, family.relation);  
                familybackground.put("occupationSiblings "+relativetotal, occupationDesc );
                familybackground.put("positionSiblings "+relativetotal, family.position );
                familybackground.put("workplaceSiblings "+relativetotal, family.workplace );
                familybackground.put("phoneSiblings "+relativetotal, family.phone );
227 228 229 230 231 232 233 234 235 236 237
                relativetotal++;
            }
        }
        familybackground.putToSum("prefixallchild",prefixallchild);
        familybackground.putToSum("nameallchild", nameallchild);
        familybackground.putToSum("ageallchild", ageallchild);
        familybackground.putToSum("occupationallchild", occupationallchild);
        familybackground.putToSum("positionallchild", positionallchild);
        familybackground.putToSum("statusallchild", line + statusallchild);
        familybackground.putToSum("workplaceandphoneallchild", workplaceandphoneallchild);
        //----------------------------END Family------------------------------------
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
        //----------------------------SETDATA REFERENCE ------------------------------------
      MyHashMap personreference = new MyHashMap();
      int roundreference = 0;

      for (int referencekey = 0; referencekey <= 5; referencekey++){
        personreference.put("name" + referencekey, "");
        personreference.put("jobtitle" + referencekey, "");
        personreference.put("companyname" + referencekey, "");
        personreference.put("phone" + referencekey, "");
        personreference.put("relations" + referencekey, "");
        personreference.put("address" + referencekey, "");
        

      }
      for (Mdrop_resumeFamily.Reference reference : simmapplicantwithgson.mdrop_resumeFamily.reference) {
        personreference.put("name" + roundreference, chk.chkNullString(reference.name," "));
        personreference.put("jobtitle" + roundreference, chk.chkNullString(reference.jobtitle," "));
        personreference.put("companyname" + roundreference, chk.chkNullString(reference.companyname," "));
        personreference.put("phone" + roundreference, chk.chkNullString(reference.phone," "));
        personreference.put("relations" + roundreference, chk.chkNullString(reference.relations," "));
        personreference.put("address" + roundreference, chk.chkNullString(reference.address," "));
        roundreference++;
      }
      //----------------------------END REFERENCE-----------------------------------------
      
263
        //----------------------------SET Children------------------------------------
264 265 266 267
        String sons = simmapplicantwithgson.mdrop_resumePersonal.children.sons.equals(null) || simmapplicantwithgson.mdrop_resumePersonal.children.sons.equals("")?
        "0":simmapplicantwithgson.mdrop_resumePersonal.children.sons;
        String daughters = simmapplicantwithgson.mdrop_resumePersonal.children.daughters.equals(null) || simmapplicantwithgson.mdrop_resumePersonal.children.daughters.equals("")?
        "0":  simmapplicantwithgson.mdrop_resumePersonal.children.daughters;
268 269
        int children = Integer.valueOf(sons)+Integer.valueOf(daughters);
        //----------------------------END Children------------------------------------
270
        //----------------------------SETDATA OTHER ------------------------------------
271 272 273 274 275 276 277 278 279 280 281
        MyHashMap companyReference = new MyHashMap();
        String mprefixdesc = "";
        int roundComReference = 0;
        for (int referencekey = 0; referencekey <= 5; referencekey++){   
         // companyReference.put("prefix" + referencekey, "");
          companyReference.put("fullname" + referencekey, "");
         // companyReference.put("lname" + referencekey, "");
          companyReference.put("position" + referencekey, "");
          //companyReference.put("relation" + referencekey, "");
          //companyReference.put("dept" + referencekey, "");
          //companyReference.put("major" + referencekey, "");
282 283
        }

284 285 286 287 288 289 290 291 292 293 294 295 296

        for (Mdrop_resumeOther.RefereeGroup refereeGroup : simmapplicantwithgson.mdrop_resumeOther.refereeGroup) {
          DbInquiry inqmprefixcom = new InitialInquiry(screen.getUProfile()).getDbInquiry("mprefix");
          inqmprefixcom.setFilter("prefixid = '" + refereeGroup.prefix + "'");
          inqmprefixcom.refresh();
          while (inqmprefixcom.next()) {
            mprefixdesc = inqmprefixcom.getString("tdesc");
          }
          companyReference.put("fullname" + roundComReference, mprefixdesc + chk.chkNullString(refereeGroup.name," ")+"   "+chk.chkNullString(refereeGroup.lname," "));
          companyReference.put("position" + roundComReference, chk.chkNullString(refereeGroup.position," "));
          roundComReference++;
        }
        //----------------------------END OTHER-----------------------------------------
297 298 299
        //----------------------------END OTHER-----------------------------------------
        //----------------------------SETDATA EDUCATION------------------------------------
        MyHashMap educationbackground = new MyHashMap();
300
        String[] masterdegree = {"L015", "L016", "L017","L009", "L006", "L010","L004", "L008","005"};
301
        String degreeDesc = "";
302
        String  EduV = ""; //Education Vocabulary
303 304
        for (String degreekey : masterdegree) {

305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
            if("L009,L010,L006,L007,L008,L004".indexOf(degreekey) > -1){
               if("L006,L009,L010".indexOf(degreekey) > -1){
                EduV = "M6";
               }else if("L004,L007,L008".indexOf(degreekey) > -1){
                 EduV = "M3";
               }
              educationbackground.put("name" + EduV, "");
              educationbackground.put("from" + EduV, "");
              educationbackground.put("to" + EduV, "");
              educationbackground.put("degree" + EduV, "");
              educationbackground.put("major" + EduV, "");
              educationbackground.put("fac" + EduV, "");
              educationbackground.put("gpa" + EduV, "");
            }else{
              educationbackground.put("name" + degreekey, "");
              educationbackground.put("from" + degreekey, "");
              educationbackground.put("to" + degreekey, "");
              educationbackground.put("degree" + degreekey, "");
              educationbackground.put("major" + degreekey, "");
              educationbackground.put("fac" + degreekey, "");
              educationbackground.put("gpa" + degreekey, "");
            }
            
328 329 330 331 332 333 334 335
        }
        DbInquiry inqdegree = new InitialInquiry(screen.getUProfile()).getDbInquiry("mdegree");
        for (Mdrop_resumeEducation.Education education : simmapplicantwithgson.mdrop_resumeEducation.education) {
            inqdegree.setFilter("degreeid = '" + education.degreetype + "'");
            inqdegree.refresh();
            while (inqdegree.next()) {
                degreeDesc = inqdegree.getString("tdesc");
            }
336 337 338 339 340 341 342 343 344
            if("L009,L010,L006,L007,L008,L004".indexOf(education.degreetype) > -1){
               if("L006,L009,L010".indexOf(education.degreetype) > -1){
                  EduV = "M6";
               }else if("L004,L007,L008".indexOf(education.degreetype) > -1){
                  EduV = "M3";
               }
            }else{
              EduV = education.degreetype ;
            }
345
            if (education.university.universitylist == null) {
346
                educationbackground.put("name" + EduV, education.university.searchtext);
347
            } else {
348
                educationbackground.put("name" + EduV, education.university.universitylist.name.tha);
349
            }
350 351 352
            educationbackground.put("from" + EduV, education.yearstart);
            educationbackground.put("to" + EduV, education.yearend);
            educationbackground.put("degree" + EduV, degreeDesc);
353
            if (education.major.majorlist == null) {
354
                educationbackground.put("major" + EduV, education.major.searchtext);
355
            } else {
356
                educationbackground.put("major" + EduV, education.major.majorlist.name.tha);
357
            }
358
            if (education.fac.searchtext == null) {
359
                educationbackground.put("fac" + EduV, education.fac.facultylist.faculty_tha);
360
            } else {
361
                educationbackground.put("fac" + EduV, education.fac.facultylist.faculty_tha);
362
            }
363
            educationbackground.put("gpa" + EduV, education.gpa);
364 365 366 367 368 369 370 371
        }

        //----------------------------SETDATA CONTACT ------------------------------------
        StringBuilder sb = new StringBuilder();
        sb.append(simmapplicantwithgson.mdrop_resumeContact.home.addr);
        if (!simmapplicantwithgson.mdrop_resumeContact.home.moo.equalsIgnoreCase("-")) {
            sb.append(" หมู่ " + simmapplicantwithgson.mdrop_resumeContact.home.moo);
        }
372
        sb.append("เลขที่ " + simmapplicantwithgson.mdrop_resumeContact.home.addr);
373 374 375 376 377 378 379
        sb.append(" ต. " + simmapplicantwithgson.mdrop_resumeContact.home.district);
        sb.append(" อ. " + simmapplicantwithgson.mdrop_resumeContact.home.zipcode.disname.tha);
        sb.append(" จ. " + simmapplicantwithgson.mdrop_resumeContact.home.zipcode.proname.tha);
        sb.append("    " + simmapplicantwithgson.mdrop_resumeContact.home.zipcode.zipid);

        StringBuilder sc = new StringBuilder();
        sc.append(simmapplicantwithgson.mdrop_resumeContact.current.addr);
380 381
        if (!simmapplicantwithgson.mdrop_resumeContact.current.moo.equalsIgnoreCase("-")) {
            sc.append(" หมู่ " + simmapplicantwithgson.mdrop_resumeContact.current.moo);
382
        }
383 384 385 386 387 388
        sc.append(" เลขที่ " + simmapplicantwithgson.mdrop_resumeContact.current.addr);
        sc.append(" ถนน " + simmapplicantwithgson.mdrop_resumeContact.current.road);
        sc.append(" ต. " + simmapplicantwithgson.mdrop_resumeContact.current.district);
        sc.append(" อ. " + simmapplicantwithgson.mdrop_resumeContact.current.zipcode.disname.tha);
        sc.append(" จ. " + simmapplicantwithgson.mdrop_resumeContact.current.zipcode.proname.tha);
        sc.append("    " + simmapplicantwithgson.mdrop_resumeContact.current.zipcode.zipid);
389 390 391 392 393 394 395 396 397 398 399
        //----------------------------END CONTACT------------------------------------

        //----------------------------SETDATA JOPEXP------------------------------------
        MyHashMap jobexp = new MyHashMap();
        int roundjobexp = 0;

        for (int jobexpkey = 0; jobexpkey <= 10; jobexpkey++){
            jobexp.put("companyname_job" + jobexpkey, "");
            jobexp.put("start" + jobexpkey, "");
            jobexp.put("end" + jobexpkey, "");
            jobexp.put("title" + jobexpkey, "");
400
            jobexp.put("natureBusiness" + jobexpkey, "");
401 402
            jobexp.put("description" + jobexpkey, "");
            jobexp.put("salary" + jobexpkey, "");
403
            jobexp.put("endingsalary" + jobexpkey, "");
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421
            jobexp.put("reason" + jobexpkey, "");
            jobexp.put("addr" + jobexpkey, "");
            jobexp.put("village" + jobexpkey, "");
            jobexp.put("floor" + jobexpkey, "");
            jobexp.put("soi" + jobexpkey, "");
            jobexp.put("moo" + jobexpkey, "");
            jobexp.put("road" + jobexpkey, "");
            jobexp.put("district" + jobexpkey, "");
            jobexp.put("disname" + jobexpkey, "");
            jobexp.put("proname" + jobexpkey, "");
            jobexp.put("zipid" + jobexpkey, "");
            jobexp.put("phoneJob" + jobexpkey, "");
        }
        for (Mdrop_resumeJobexp.Job job : simmapplicantwithgson.mdrop_resumeJobexp.job) {
            jobexp.put("companyname_job" + roundjobexp, job.companyname);
            jobexp.put("start" + roundjobexp,new CscCalendar(job.start.toString().substring(0,10)).getDDMMYYYY());
            jobexp.put("end" + roundjobexp, new CscCalendar(job.end.toString().substring(0,10)).getDDMMYYYY());
            jobexp.put("title" + roundjobexp, job.title);
422
            jobexp.put("natureBusiness" + roundjobexp, job.natureBusiness);
423
            jobexp.put("description" + roundjobexp, job.description);
424 425
            jobexp.put("salary" + roundjobexp, job.endingsalary.equals("")?"-": DFO.format(Integer.valueOf( job.salary.toString().replaceAll(",",""))));
            jobexp.put("endingsalary" + roundjobexp,job.endingsalary.equals("")?"-": DFO.format(Integer.valueOf( job.endingsalary.toString().replaceAll(",",""))));
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
            jobexp.put("reason" + roundjobexp, job.reason);
            jobexp.put("addr" + roundjobexp, job.addr);
            jobexp.put("village" + roundjobexp, job.village);
            jobexp.put("floor" + roundjobexp, job.floor);
            jobexp.put("soi" + roundjobexp, job.soi);
            jobexp.put("moo" + roundjobexp, job.moo);
            jobexp.put("road" + roundjobexp, job.road);
            jobexp.put("district" + roundjobexp, job.district);
            jobexp.put("disname_job" + roundjobexp, job.zipcode.disname.tha);
            jobexp.put("proname_job" + roundjobexp, job.zipcode.proname.tha);
            jobexp.put("zipid" + roundjobexp, job.zipcode.zipid);
            jobexp.put("phoneJob" + roundjobexp, job.phone);
            roundjobexp++;
        }
        //----------------------------END JOPEXP------------------------------------
441 442 443 444 445 446 447 448 449 450 451
        //----------------------------SETDATA Training------------------------------------
        MyHashMap trainingHM = new MyHashMap();
        int roundtraining = 0;
        String startDay ="";
        String endDay ="";
        for (int round = 0; round < 6; round++){
            trainingHM.put("name" + round, "");
            trainingHM.put("by" + round, "");
            trainingHM.put("year" + round, "");
            trainingHM.put("countday" + round, "");
        }
452

453 454 455 456 457 458 459 460 461 462 463
        for (Mdrop_resumeJobexp.Training training : simmapplicantwithgson.mdrop_resumeJobexp.training) {
          startDay = new CscCalendar(training.start.toString().substring(0,10)).getYYYYMMDD();
          endDay = new CscCalendar(training.end.toString().substring(0,10)).getYYYYMMDD();
          int Countday = new CscCalendar(startDay).countDay(endDay);
            trainingHM.putToSum("name" + roundtraining, training.name);
            trainingHM.putToSum("by" + roundtraining, training.by);
            trainingHM.putToSum("year" + roundtraining,new CscCalendar(training.start.toString().substring(0,4)).getThaiYYYY());
            trainingHM.putToSum("countday" + roundtraining,String.valueOf(Countday) + " วัน");
            roundtraining++;
        }
        //----------------------------END Training------------------------------------
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514
        //----------------------------nationality------------------------------------

        String nationalityDesc = "";

        DbInquiry inqMnationality = new InitialInquiry(screen.getUProfile()).getDbInquiry("Mnationality");
        inqMnationality.setFilter("nationalityid = '" + simmapplicantwithgson.mdrop_resumePersonal.nationalityid + "'");
        inqMnationality.refresh();
        while (inqMnationality.next()) {
            nationalityDesc = inqMnationality.getString("tdesc");
        }

        //----------------------------END nationality------------------------------------

        //------------------------------------age------------------------------------
        String age_memployee = "";

        CscCalendar startDate = new CscCalendar(simmapplicantwithgson.mdrop_resumePersonal.birthdate.substring(0,10));
        CscCalendar endDate = new CscCalendar();
        CountAge count = new CountAge(screen.getUProfile().get("lang"));
        age_memployee=count.getCountAges(startDate,endDate,true);

        //------------------------------------end age------------------------------------

        //----------------------------nationa------------------------------------

        String nationaDesc = "";

        DbInquiry inqmnational = new InitialInquiry(screen.getUProfile()).getDbInquiry("mnational");
        inqmnational.setFilter("nationalid = '" + simmapplicantwithgson.mdrop_resumePersonal.nationalityid + "'");
        inqmnational.refresh();
        while (inqmnational.next()) {
            nationaDesc = inqmnational.getString("tdesc");
        }

        //----------------------------END nationa------------------------------------

        // ----------------------------religion------------------------------------

        String religionDesc = "";

        DbInquiry inqmreligion = new InitialInquiry(screen.getUProfile()).getDbInquiry("mreligion");
        inqmreligion.setFilter("religionid = '"+simmapplicantwithgson.mdrop_resumePersonal.religionid+"'");
        inqmreligion.refresh();
        while(inqmreligion.next()){
            religionDesc = inqmreligion.getString("tdesc");
        }

        //----------------------------END religion------------------------------------
        //----------------------------SETDATA Skill ------------------------------------
        MyHashMap hmlangskill = new MyHashMap();
        MyHashMap masterskilllevel = new MyHashMap();
515
        String[] id = {"EN", "CH", "JP", "TH"};
516 517 518
        String skillnameDesc ="";
        String skilllevelDesc ="";
        int langskillloop = 0;
519 520
        for (String initlangskill : id) {
            hmlangskill.put("skillname"+initlangskill,"");
521
            hmlangskill.put("id"+initlangskill,"XX");
522 523 524 525 526
            hmlangskill.put("reading"+initlangskill,"");
            hmlangskill.put("write"+initlangskill,"");
            hmlangskill.put("speak"+initlangskill,"");
            hmlangskill.put("listen"+initlangskill,"");
        }
527 528
        for(int initlangskill = 0; initlangskill <= 5; initlangskill++){
            hmlangskill.put("skillname"+initlangskill,"");
529
            hmlangskill.put("id"+initlangskill,"");
530 531 532 533 534 535 536 537 538
            hmlangskill.put("reading"+initlangskill,"");
            hmlangskill.put("write"+initlangskill,"");
            hmlangskill.put("speak"+initlangskill,"");
            hmlangskill.put("listen"+initlangskill,"");
        }

        DbInquiry inqskilllevel = new InitialInquiry(screen.getUProfile()).getDbInquiry("mskilllevel");
        inqskilllevel.refresh();
        while(inqskilllevel.next()) {
539
            masterskilllevel.put(inqskilllevel.getString("skilllevelid"),inqskilllevel.getString("skilllevelid"));
540
        }
541
        //DbInquiry inqlangskill = new InitialInquiry(screen.getUProfile()).getDbInquiry("mlanguage");
542 543
        for (Mdrop_resumeSkill.Langskill langskill : simmapplicantwithgson.mdrop_resumeSkill.langskill) {

544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559
            hmlangskill.put("skillname"+langskill.langskilllist.id, langskill.langskilllist.name.tha);
            hmlangskill.put("id"+langskill.langskilllist.id, langskill.langskilllist.id);
            hmlangskill.put("reading"+langskill.langskilllist.id,masterskilllevel.get(langskill.skill.reading));
            hmlangskill.put("write"+langskill.langskilllist.id,masterskilllevel.get(langskill.skill.write));
            hmlangskill.put("speak"+langskill.langskilllist.id,masterskilllevel.get(langskill.skill.speak));
            hmlangskill.put("listen"+langskill.langskilllist.id,masterskilllevel.get(langskill.skill.listen));

            if(!(("CH,EN").indexOf(langskill.langskilllist.id) > -1)){
              hmlangskill.put("skillname"+langskillloop, langskill.langskilllist.name.tha);
              hmlangskill.put("id"+langskill.langskilllist.id, langskill.langskilllist.id);
              hmlangskill.put("reading"+langskillloop,masterskilllevel.get(langskill.skill.reading));
              hmlangskill.put("write"+langskillloop,masterskilllevel.get(langskill.skill.write));
              hmlangskill.put("speak"+langskillloop,masterskilllevel.get(langskill.skill.speak));
              hmlangskill.put("listen"+langskillloop,masterskilllevel.get(langskill.skill.listen));
              langskillloop++;
            }
560 561
        }
        //----------------------------End Skill ----------------------------------------
562 563 564
         //----------------------------SETDATA Activity ------------------------------------
        MyHashMap hmactivity = new MyHashMap();
        int activityloop = 0;
565
        String degreeDesc2 ="";
566 567 568 569 570 571 572 573 574
        for(int init = 0; init < 1; init++){
            hmactivity.put("name"+init,"");
            hmactivity.put("degreetype"+init,"");
            hmactivity.put("role"+init,"");
            hmactivity.put("roledesc"+init,"");
            hmactivity.put("start"+init,"");
            hmactivity.put("end"+init,"");
        }

575 576
        DbInquiry inqdegree2 = new InitialInquiry(screen.getUProfile()).getDbInquiry("mdegree");

577 578
        //DbInquiry inqlangskill = new InitialInquiry(screen.getUProfile()).getDbInquiry("mlanguage");
        for (Mdrop_resumeSkill.Activity activity : simmapplicantwithgson.mdrop_resumeSkill.activity) {
579 580 581 582 583
          inqdegree2.setFilter("degreeid = '" + activity.degreetype + "'");
          inqdegree2.refresh();
          while (inqdegree2.next()) {
            degreeDesc2 = inqdegree2.getString("tdesc");
          }
584
            hmactivity.put("name"+activityloop,activity.name);
585
            hmactivity.put("degreetype"+activityloop,degreeDesc2);
586 587 588 589 590 591 592
            hmactivity.put("role"+activityloop,activity.role);
            hmactivity.put("roledesc"+activityloop,activity.roledesc);
            hmactivity.put("start"+activityloop,activity.start);
            hmactivity.put("end"+activityloop,activity.end);
            activityloop++;
            
        }
593
      //----------------------------End Activity ----------------------------------------
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629
      //----------------------------Set Hobbies ----------------------------------------
        String hobbies = "";
        String[] array = new String[simmapplicantwithgson.mdrop_resumeSkill.hobbies.size()];
        int index = 0;
        for (Object value : simmapplicantwithgson.mdrop_resumeSkill.hobbies) {
          if(index != 0){
            hobbies += ",";
          }
          hobbies += (String) value;
          index++;
        }
      //----------------------------End Hobbies ----------------------------------------
      //----------------------------Set Sport ----------------------------------------
        String sport = "";
        array = new String[simmapplicantwithgson.mdrop_resumeSkill.sport.size()];
        index = 0;
        for (Object value : simmapplicantwithgson.mdrop_resumeSkill.sport) {
          if(index != 0){
            sport += ",";
          }
          sport += (String) value;
          index++;
        }
      //----------------------------End Sport ----------------------------------------
      //----------------------------Set Expertise ----------------------------------------
        String expertise = "";
        array = new String[simmapplicantwithgson.mdrop_resumeSkill.expertise.size()];
        index = 0;
        for (Object value : simmapplicantwithgson.mdrop_resumeSkill.expertise) {
          if(index != 0){
            expertise += ",";
          }
          expertise += (String) value;
          index++;
        }
       //----------------------------End Expertise ----------------------------------------
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652
        try {
            CscCalendar calendar = new CscCalendar();
            GregorianCalendar gc = new GregorianCalendar();
            boolean langthai = screen.getUProfile().get("lang").equalsIgnoreCase("THA");
            String reportname = "", printdate = "", printby = "", refer = "RTA2007";
            String reportname_label = "", printdate_label = "", prdate = "", refer_label = "";
            if (langthai) {
                reportname_label = "รายงาน :";
                reportname = "รายงานข้อมูลพนักงาน";
                printdate_label = "วันที่พิมพ์ :";
                prdate = calendar.getDDMMYYYY();
                printdate = "วัน" + calendar.getLongThiDOW() + "ที่ " + calendar.getDate() + " " + calendar.getThaiLongMonth() + " พ.ศ. " + calendar.getThaiYYYY() + " " + calendar.getHHMM() + " น.";
                printby = screen.getUProfile().get("tfullname");
                refer_label = "อ้างอิง #";
            } else {
                reportname_label = "Report Name :";
                reportname = "Personal Report";
                printdate_label = "Print Date :";
                printby = screen.getUProfile().get("efullname");
                refer_label = "Ref #";
            }


653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682
      // --------------- new line -----------------
      sizeColumn = new float[]{20.0f,60.0f,20.0f};
      PdfPTable detailHeader = new PdfPTable(3);
      detailHeader.setWidthPercentage(100);
      detailHeader.setWidths(sizeColumn);
      PdfPCell cellDetail;
      Image imglogo = null;
      
      //Image logo= new Image(ImageDataFactory.create(IMG));
      setPaddingTop(1.0f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
      setPaddingBottom(4.5f);

      DbInquiry mcom = new InitialInquiry(screen.getUProfile()).getDbInquiry("mcompany");
      try{
        imglogo = Image.getInstance(getImagePath("COMPANY_UPLOAD-dir","LOGO/","DHAS_RECRUIT.PNG","DEFAULTPERSON.jpg"));
        imglogo.scaleToFit(450, 80);
     //   cellDetail = new PdfPCell(img, true);
     //   cellDetail.setHorizontalAlignment(Element.ALIGN_CENTER);
     //   cellDetail.setVerticalAlignment (Element.ALIGN_MIDDLE);
     //   cellDetail.setFixedHeight(80);
     //   cellDetail.setBorder(Rectangle.NO_BORDER);
      imglogo.setAbsolutePosition(50f, 630f);
     //   detailHeader.addCell(cellDetail);
      }
      catch (Exception e) {
        detailHeader.addCell(getCellData("NO PIC", font12N, "", "CENTER", "MIDDLE", 1, 5));
      } 
      document.add(imglogo);
683 684 685 686 687 688 689 690 691 692 693 694
      // --------------- Report Header -----------------
      // --------------- new line -----------------
      sizeColumn = new float[]{100.0f};
      PdfPTable detail = new PdfPTable(1);
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      Image img = null;
      setPaddingTop(0.5f);
      setPaddingLeft(0.0f);
      setPaddingRight(0.0f);


695
      detail.addCell(getCellData("FR-710-007 / Revision No. : 01", font12N, "NO", "RIGHT", "TOP", 0, 0));
696
      detail.addCell(getCellData("Effective Date : 12/05/09", font12N, "NO", "RIGHT", "TOP", 0, 0));
697
      setPaddingTop(10.5f);
698 699 700 701 702 703 704

      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));
705 706 707
      setPaddingTop(50.5f);
      setPaddingBottom(4.5f);
      detail.addCell(getCellData(" ", font12N, "NO", "RIGHT", "TOP", 0, 0));
708 709 710 711 712 713 714
      document.add(detail);

      // --------------- new line -----------------
      sizeColumn = new float[]{15.0f,15.0f,70.0f};
      detail = new PdfPTable(3);
      detail.setWidthPercentage(90);
      detail.setWidths(sizeColumn);
715
      setPaddingTop(0.5f);
716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754
      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));

      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));

      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 -----------------
755 756
      sizeColumn = new float[]{25.0f,30.0f,15.0f,15.0f,20.0f,26.25f};
      detail = new PdfPTable(6);
757 758 759 760 761
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      setPaddingTop(3.5f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
762
      setPaddingBottom(6.5f);
763 764
      detail.addCell(getCellData("ตำแหน่งที่สมัคร", font14B, "", "CENTER", "MIDDLE", 3, 0,false,true));
      detail.addCell(getCellData("เงินเดือนที่ต้องการ", font14B, "", "CENTER", "TOP", 2, 0,false,true));
765 766 767 768 769 770
      //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);
771
      cellDetail.setColspan(1);
772 773
      cellDetail.setRowspan(7);
      detail.addCell(cellDetail);
774 775
      detail.addCell(getCellData("1."+screen.getString("MJOBCODE", "TDESC"), font14N, "", "LEFT", "TOP", 3, 0));
      detail.addCell(getCellData(DFO.format(Integer.valueOf(screen.getString("SALARY_EXPECT"))).toString()+"  บาท", font14N, "", "RIGHT", "TOP", 2, 0));
776 777
      detail.addCell(getCellData(" ", font14N, "", "LEFT", "TOP", 3, 0));
      detail.addCell(getCellData(" ", font14N, "", "RIGHT", "TOP", 2, 0));
778

779
      detail.addCell(getCellData("ประวัติส่วนตัว", font14N, "", "CENTER", "TOP", 5, 0,false,true));
780

781 782 783 784
      setPaddingTop(2.5f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
      setPaddingBottom(2.5f);
785

786
      String prefix  = simmapplicantwithgson.mdrop_resumePersonal.prefixid;
787 788 789 790 791 792 793
      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);
794
      }else if(prefix.equalsIgnoreCase("02")){
795
        Chu2.setUnderline(0.1f, -2f);
796
      }else if(prefix.equalsIgnoreCase("03")){
797 798 799 800 801 802 803 804 805 806
        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) );
807
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.fname.tha, font14N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
808
      detail.addCell(getCellData("นามสกุล", font14N, "NO", "LEFT", "TOP", 0, 0));
809
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.lname.tha, font14N, "R_BOTTOM_DOT", "LEFT", "TOP", 2, 0));
810 811 812 813 814 815 816 817

      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);
818
      } else if(prefix.equalsIgnoreCase("02")){
819
        Chu2.setUnderline(0.1f, -2f);
820
      }else if(prefix.equalsIgnoreCase("03")){
821 822 823 824 825 826 827 828 829 830
        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) );
831
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.fname.eng, font14N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
832
      detail.addCell(getCellData("SURNAME", font14N, "NO", "LEFT", "TOP", 0, 0));
833 834 835 836 837 838
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.lname.eng, font14N, "R_BOTTOM_DOT", "LEFT", "TOP", 2, 0));
      setPaddingTop(0.0f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
      setPaddingBottom(0.0f);
      detail.addCell(getCellData(" ", font14N, "NO", "CENTER", "TOP", 5, 0));
839 840 841 842 843 844 845 846 847 848 849
      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);
850 851 852 853 854
      detail.addCell(getCellData("วัน / เดือน / ปีที่เกิด", font14B, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData("อายุ", font14B, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData("สัญชาติ", font14B, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData("ส่วนสูง", font14B, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData("น้ำหนัก", font14B, "", "CENTER", "TOP", 0, 0));
855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873
 
      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));
874
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumePersonal.identification.idenNumber, font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
875
      detail.addCell(getCellData("วันที่ออกบัตร", font12N, "NO", "LEFT", "TOP", 0, 0));
876
      detail.addCell(getCellData(new CscCalendar(simmapplicantwithgson.mdrop_resumePersonal.identification.pinstart.substring(0, 10)).getDDMMYYYY(), font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
877
      detail.addCell(getCellData("วันที่หมดอายุ", font12N, "NO", "LEFT", "TOP", 0, 0));
878
      detail.addCell(getCellData(new CscCalendar(simmapplicantwithgson.mdrop_resumePersonal.identification.pinend.substring(0, 10)).getDDMMYYYY(), font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
879 880
      document.add(detail);
      // --------------- new line -----------------
881
      String military_status = simmapplicantwithgson.mdrop_resumePersonal.military.status;
882 883 884 885 886 887 888 889 890
      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));
891
      detail.addCell(getCellData(" ", font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
892
      detail.addCell(getCellData("(เฉพาะเพศชาย) สถานภาพทางทหาร", font12N, "NO", "LEFT", "TOP", 0, 0));
893
      detail.addCell(getCellData(military_status.equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "TOP", 0, 0));
894
      detail.addCell(getCellData("ผ่านการเกณฑ์ทหาร", font12N, "NO", "LEFT", "TOP", 0, 0));
895
      detail.addCell(getCellData(military_status.equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "TOP", 0, 0));
896
      detail.addCell(getCellData("ยังไม่ผ่านการเกณฑ์ทหาร", font12N, "NO", "LEFT", "TOP", 0, 0));
897
      detail.addCell(getCellData(military_status.equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "TOP", 0, 0));
898 899 900
      detail.addCell(getCellData("ได้รับการยกเว้น / รด.", font12N, "NO", "LEFT", "TOP", 0, 0));
      document.add(detail);
      // --------------- new line -----------------
901
      String sso_hospital = simmapplicantwithgson.mdrop_resumePersonal.sso.hospital;
902
      sizeColumn = new float[]{15.0f,20.0f,6.0f,7.0f,6.0f,7.0f};
903 904 905 906 907 908 909 910
      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));
911
      detail.addCell(getCellData(sso_hospital, font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
912
      detail.addCell(getCellData("วันที่ออกบัตร", font12N, "NO", "LEFT", "TOP", 0, 0));
913
      detail.addCell(getCellData(new CscCalendar(simmapplicantwithgson.mdrop_resumePersonal.sso.pinstart.substring(0, 10)).getThaiDDMMYYYY(), font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
914
      detail.addCell(getCellData("วันที่หมดอายุ", font12N, "NO", "LEFT", "TOP", 0, 0));
915
      detail.addCell(getCellData(new CscCalendar(simmapplicantwithgson.mdrop_resumePersonal.sso.pinend.substring(0, 10)).getThaiDDMMYYYY(), font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
916 917 918 919 920 921 922 923 924 925 926 927
       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);
928
      detail.addCell(getCellData("การติดต่อกับผู้สมัครงาน", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
929 930
      document.add(detail);
      // --------------- new line -----------------
931
      sizeColumn = new float[]{15.0f,35.0f,10.0f,40.0f};
932 933 934 935 936 937 938 939
      detail = new PdfPTable(4);
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      setPaddingTop(0.0f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
      setPaddingBottom(0.5f);
      detail.addCell(getCellData("ที่อยู่ปัจจุบัน", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
940
      detail.addCell(getCellData(sb.toString(), font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 3, 0));
941
      detail.addCell(getCellData("โทรศัพท์บ้าน", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
942
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumeContact.current.number, font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 1, 0));
943
      detail.addCell(getCellData("โทรศัพท์มือถือ", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
944
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumeContact.phone, font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 1, 0));
945
      detail.addCell(getCellData("ที่อยู่ตามทะเบียนบ้าน", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
946
      detail.addCell(getCellData(sc.toString(), font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 3, 0));
947
      detail.addCell(getCellData("โทรศัพท์", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
948 949
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumeContact.home.number, font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 3, 0));
      detail.addCell(getCellData(" ", font12N, "NO", "LEFT", "MIDDLE", 4, 0));
950 951 952 953 954 955 956 957 958 959 960 961
      
      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);
962
      detail.addCell(getCellData("บุคคลที่บริษัทฯ สามารถติดต่อ กรณีฉุกเฉิน", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
963 964
      document.add(detail);
      // --------------- new line -----------------
965 966
      String emergencyContact = simmapplicantwithgson.mdrop_resumeContact.emergencyContact.address;
      sizeColumn = new float[]{10.0f,20.0f,10.0f,10.0f,10.0f,10.0f,10.0f,10.0f};
967 968 969 970 971 972 973 974
      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));
975
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumeContact.emergencyContact.name, font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
976
      detail.addCell(getCellData("ความสัมพันธ์", font12N, "NO", "LEFT", "TOP", 0, 0));
977
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumeContact.emergencyContact.relations, font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
978 979 980
      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));
981
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumeContact.emergencyContact.phone, font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
982
      detail.addCell(getCellData("ที่อยู่/ติดต่อ", font12N, "NO", "LEFT", "TOP", 0, 0));
983
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumeContact.emergencyContact.address, font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 7, 0));
984 985

      detail.addCell(getCellData("2.ชื่อ-สกุล", font12N, "NO", "LEFT", "TOP", 0, 0));
986
      detail.addCell(getCellData("...", font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
987
      detail.addCell(getCellData("ความสัมพันธ์", font12N, "NO", "LEFT", "TOP", 0, 0));
988
      detail.addCell(getCellData("../../..", font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
989
      detail.addCell(getCellData("อาชีพ", font12N, "NO", "LEFT", "TOP", 0, 0));
990
      detail.addCell(getCellData("../../..", font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
991
      detail.addCell(getCellData("โทรศัพท์", font12N, "NO", "LEFT", "TOP", 0, 0));
992
      detail.addCell(getCellData("../../..", font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
993
      detail.addCell(getCellData("ที่อยู่/ติดต่อ", font12N, "NO", "LEFT", "TOP", 0, 0));
994
      detail.addCell(getCellData("../../..", font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 7, 0));
995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008
      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);
1009
      detail.addCell(getCellData("ประวัติทั่วไป", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
1010 1011 1012
      document.add(detail);

      // --------------- new line -----------------
1013
      String birthorder = simmapplicantwithgson.mdrop_resumePersonal.birthorder;
1014 1015
      sizeColumn = new float[]{8.5f,3.0f,3.0f,6.5f,3.0f,6.0f,3.0f,3.0f,6.0f,3.0f,3.0f,6.0f,3.0f,3.0f,6.0f,3.0f,3.0f};
      detail = new PdfPTable(17);
1016 1017 1018 1019 1020
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      setPaddingTop(3.5f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
1021
      setPaddingBottom(0.5f);
1022
      detail.addCell(getCellData("พี่น้องรวมทั้งหมด", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034
      detail.addCell(getCellData(String.valueOf(relativetotal+1), font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("คน", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("ท่านเป็นคนที่", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData(birthorder, font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("พี่ชาย", font12N, "NO", "RIGHT", "MIDDLE", 0, 0));
      detail.addCell(getCellData(familybackground.get("relation05").toString(), font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("คน", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("พี่สาว", font12N, "NO", "RIGHT", "MIDDLE", 0, 0));
      detail.addCell(getCellData(familybackground.get("relation07").toString(), font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("คน", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("น้องชาย", font12N, "NO", "RIGHT", "MIDDLE", 0, 0));
      detail.addCell(getCellData(familybackground.get("relation06").toString(), font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
1035
      detail.addCell(getCellData("คน", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
1036 1037 1038 1039 1040 1041
      detail.addCell(getCellData("น้องสาว", font12N, "NO", "RIGHT", "MIDDLE", 0, 0));
      detail.addCell(getCellData(familybackground.get("relation08").toString(), font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("คน", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      setPaddingTop(0.5f);
      setPaddingBottom(0.5f);
      detail.addCell(getCellData(" ", font12N, "NO", "LEFT", "MIDDLE", 17, 0));
1042 1043


1044 1045
      document.add(detail);
      // --------------- new line -----------------
1046
      String brosis = "";
1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062
      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));
1063 1064 1065 1066 1067
      detail.addCell(getCellData(familybackground.get("prefix01").toString()+" "+familybackground.get("fname01").toString() + "   " + familybackground.get("lname01").toString(), font12N, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData(familybackground.get("age01").toString(), font12N, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData(familybackground.get("occupation01").toString(), font12N, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData(familybackground.get("workplace01").toString(), font12N, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData(familybackground.get("phone01").toString(), font12N, "", "CENTER", "TOP", 0, 0));
1068 1069

      detail.addCell(getCellData("มารดา", font12N, "", "CENTER", "TOP", 0, 0));
1070 1071 1072 1073 1074
      detail.addCell(getCellData(familybackground.get("prefix02").toString()+" "+familybackground.get("fname02").toString() + "   " + familybackground.get("lname02").toString(), font12N, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData(familybackground.get("age02").toString(), font12N, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData(familybackground.get("occupation02").toString(), font12N, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData(familybackground.get("workplace02").toString(), font12N, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData(familybackground.get("phone02").toString(), font12N, "", "CENTER", "TOP", 0, 0));
1075

1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094
      for(int num=0;num<5;num++){ 
      //detail.addCell(getCellData("[]พี่ []น้อง", font12N, "", "CENTER", "TOP", 0, 0));
      brosis = familybackground.get("relationSiblings "+num).toString();
      Chu0 = new Chunk("05,07".indexOf(brosis) > -1? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
      Chu1 = new Chunk(" พี่   ",font12N);
      Chu2 = new Chunk("06,08".indexOf(brosis) > -1? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
      Chu3 = new Chunk(" น้อง",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      content.add(Chu2);
      content.add(Chu3);
      detail.addCell(getCellData2( content, "", "CENTER", "MIDDLE",  1,  1) );
     // detail.addCell(getCellData(brosis, font12N, "NO", "CENTER", "MIDDLE", 1, 0));
      detail.addCell(getCellData(familybackground.get("nameSiblings "+num).toString(), font12N, "", "CENTER", "MIDDLE", 1, 0));
      detail.addCell(getCellData(familybackground.get("ageSiblings "+num).toString(), font12N, "", "CENTER", "MIDDLE", 1, 0));
      detail.addCell(getCellData(familybackground.get("occupationSiblings "+num).toString(), font12N, "", "CENTER", "MIDDLE", 1, 0));
      detail.addCell(getCellData(familybackground.get("workplaceSiblings "+num).toString(), font12N, "", "CENTER", "MIDDLE", 1, 0));
      detail.addCell(getCellData(familybackground.get("phoneSiblings "+num).toString(), font12N, "", "CENTER", "MIDDLE", 1, 0));
1095 1096 1097 1098 1099
      }
      setPaddingBottom(0.5f);
      document.add(detail);
      // --------------- new line -----------------
      String personal_status = simmapplicantwithgson.mdrop_resumePersonal.status;
1100
      sizeColumn = new float[]{15.0f,10.0f,15.0f,15.0f,10.0f,10.0f};
1101 1102 1103 1104 1105 1106 1107
      detail = new PdfPTable(6);
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      setPaddingTop(3.0f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
      setPaddingBottom(6.5f);
1108
      detail.addCell(getCellData("สถานภาพสมรส", font14B, "NO", "LEFT", "TOP", 0, 0));
1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142

      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 -----------------
1143
      sizeColumn = new float[]{10.0f,20.0f,5.0f,3.0f,5.0f,15.0f};
1144 1145 1146 1147 1148 1149 1150 1151
      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));
1152 1153 1154
      detail.addCell(getCellData(familybackground.get("prefix03").toString()+" "+familybackground.get("fname03").toString() + "   " + familybackground.get("lname03").toString(), font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
      detail.addCell(getCellData("อายุ", font12N, "NO", "RIGHT", "TOP", 0, 0));
      detail.addCell(getCellData(familybackground.get("age03").toString(), font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1155
      detail.addCell(getCellData("ปี  อาชีพ", font12N, "NO", "LEFT", "TOP", 0, 0));
1156
      detail.addCell(getCellData(familybackground.get("occupation03").toString(), font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
1157
      detail.addCell(getCellData("สถานที่ทำงาน / ที่ติดต่อ", font12N, "NO", "LEFT", "TOP", 0, 0));
1158
      detail.addCell(getCellData(familybackground.get("workplace03").toString(), font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 3, 0));
1159
      detail.addCell(getCellData("โทรศัพท์", font12N, "NO", "LEFT", "TOP", 0, 0));
1160
      detail.addCell(getCellData(familybackground.get("phone03").toString(), font12N, "R_BOTTOM_DOT", "LEFT", "TOP", 0, 0));
1161 1162 1163
      setPaddingBottom(0.5f);
      document.add(detail);
      // --------------- new line -----------------
1164

1165 1166
      sizeColumn = new float[]{6.0f,5.0f,3.0f,5.0f,5.0f,3.0f,5.0f,5.0f,30.0f};
      detail = new PdfPTable(9);
1167 1168 1169 1170 1171 1172 1173
      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));
1174 1175 1176 1177 1178 1179 1180 1181
      detail.addCell(getCellData(String.valueOf(children), font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData("คน", font12N, "NO", "LEFT", "TOP", 0, 0));
      detail.addCell(getCellData("ศึกษา", font12N, "NO", "RIGHT", "TOP", 0, 0));
      detail.addCell(getCellData("...", font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData("คน", font12N, "NO", "LEFT", "TOP", 0, 0));
      detail.addCell(getCellData("ไม่ศึกษา", font12N, "NO", "RIGHT", "TOP", 0, 0));
      detail.addCell(getCellData("...", font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData("คน", font12N, "NO", "LEFT", "TOP", 0, 0));
1182 1183 1184 1185 1186 1187 1188 1189
      setPaddingBottom(0.5f);
      document.add(detail);

      // --------------- new line -----------------
      sizeColumn = new float[]{100.0f};
      detail = new PdfPTable(1);
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
1190
      setPaddingTop(0.5f);
1191 1192
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
1193
      setPaddingBottom(0.5f);
1194
      detail.addCell(getCellData(" ", font12N, "NO", "LEFT", "TOP", 0, 0));
1195 1196 1197
      setPaddingTop(3.5f);
      setPaddingBottom(6.5f);
      detail.addCell(getCellData("ประวัติการศึกษา", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
1198 1199
      document.add(detail);
      // --------------- new line -----------------
1200
      sizeColumn = new float[]{8.0f,15.0f,8.0f,8.0f,15.0f,20.0f,5.0f};
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216
      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));
1217 1218 1219 1220 1221 1222
      detail.addCell(getCellData(educationbackground.get("nameL016").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("fromL016").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("toL016").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("facL016").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("majorL016").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("gpaL016").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
1223
      detail.addCell(getCellData("ปริญญาตรี", font12N, "", "CENTER", "TOP", 0, 0));
1224 1225 1226 1227 1228 1229 1230
      detail.addCell(getCellData(educationbackground.get("nameL015").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("fromL015").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("toL015").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("facL015").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("majorL015").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("gpaL015").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      // แสดงเฉพาะ จบที่สูงที่สุดก่อน
1231 1232 1233 1234 1235 1236 1237
      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));
1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253
      detail.addCell(getCellData("ม.6", font12N, "", "CENTER", "TOP", 0, 0));
      
      detail.addCell(getCellData(educationbackground.get("nameM6").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("fromM6").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("toM6").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("facM6").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("majorM6").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("gpaM6").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));

      detail.addCell(getCellData("ม.3", font12N, "", "CENTER", "TOP", 0, 0));
      detail.addCell(getCellData(educationbackground.get("nameM3").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("fromM3").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("toM3").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("facM3").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("majorM3").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
      detail.addCell(getCellData(educationbackground.get("gpaM3").toString(), font12N, "", "CENTER", "TOP", 0, 0,true,false));
1254 1255 1256 1257 1258 1259 1260 1261 1262
      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);
1263
      setPaddingBottom(0.5f);
1264 1265 1266 1267 1268 1269 1270 1271 1272
      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));
1273 1274
      setPaddingTop(0.5f);
      detail.addCell(getCellData(" ", font12N, "R_BOTTOM", "CENTER", "TOP", 9, 0));
1275 1276 1277 1278 1279 1280 1281 1282 1283
      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);
1284
      setPaddingBottom(0.5f);
1285 1286
      detail.addCell(getCellData("ประวัติกิจกรรม", font14B, "NO", "LEFT", "TOP", 0, 0));
      detail.addCell(getCellData("ระดับการศึกษา", font12N, "NO", "LEFT", "TOP", 0, 0));
1287
      detail.addCell(getCellData(hmactivity.get("degreetype0").toString(), font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1288
      detail.addCell(getCellData("กิจกรรม", font12N, "NO", "LEFT", "TOP", 0, 0));
1289
      detail.addCell(getCellData(hmactivity.get("name0").toString(), font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1290
      detail.addCell(getCellData("ตำแหน่งกิจกรรม", font12N, "NO", "LEFT", "TOP", 0, 0));
1291
      detail.addCell(getCellData(hmactivity.get("role0").toString(), font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1292 1293
      document.add(detail);
      // --------------- new line -----------------
1294

1295
      sizeColumn = new float[]{14.5f,35.0f,14.0f,35.0f};
1296 1297 1298 1299 1300 1301
      detail = new PdfPTable(4);
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      setPaddingTop(3.5f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
1302 1303
      setPaddingBottom(0.5f);
      detail.addCell(getCellData("หน้าที่/ความรับผิดชอบ", font12N, "NO", "LEFT", "TOP", 0, 0));
1304
      detail.addCell(getCellData(hmactivity.get("roledesc0").toString(), font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1305
      detail.addCell(getCellData("ช่วงเวลาที่ทำกิจกรรม", font12N, "NO", "LEFT", "TOP", 0, 0));
1306
      detail.addCell(getCellData(hmactivity.get("start0").toString().toString().substring(0,10) + "ถึง" + hmactivity.get("end0").toString().substring(0,10), font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1307
      detail.addCell(getCellData("งานอดิเรก", font12N, "NO", "LEFT", "TOP", 0, 0));
1308
      detail.addCell(getCellData(hobbies, font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1309
      detail.addCell(getCellData("กีฬาที่ถนัด", font12N, "NO", "LEFT", "TOP", 0, 0));
1310
      detail.addCell(getCellData(sport, font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1311 1312
      document.add(detail);
      // --------------- new line -----------------
1313 1314
      sizeColumn = new float[]{15.0f,15.0f,10.0f,10.0f,7.0f,15.0f,5.0f,25.0f};
      detail = new PdfPTable(8);
1315 1316 1317 1318 1319
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      setPaddingTop(3.5f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
1320 1321
      setPaddingBottom(0.5f);
      detail.addCell(getCellData("ความสามารถพิเศษ", font12N, "NO", "LEFT", "TOP", 0, 0));
1322
      detail.addCell(getCellData(expertise, font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1323
      detail.addCell(getCellData("พิมพ์ดีดไทย", font12N, "NO", "RIGHT", "TOP", 0, 0));
1324
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumeSkill.typing.tha, font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1325 1326
      detail.addCell(getCellData("คำ/นาที", font12N, "NO", "LEFT", "TOP", 0, 0));
      detail.addCell(getCellData("พิมพ์ดีดอังกฤษ", font12N, "NO", "RIGHT", "TOP", 0, 0));
1327
      detail.addCell(getCellData(simmapplicantwithgson.mdrop_resumeSkill.typing.eng, font12N, "R_BOTTOM_DOT", "CENTER", "TOP", 0, 0));
1328
      detail.addCell(getCellData("คำ/นาที", font12N, "NO", "LEFT", "TOP", 0, 0));
1329 1330
      setPaddingTop(0.5f);
      detail.addCell(getCellData(" ", font12N, "R_BOTTOM", "LEFT", "TOP", 8, 0));
1331 1332 1333 1334 1335 1336 1337 1338 1339 1340
      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);
1341
      setPaddingBottom(0.5f);
1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353
      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);
1354
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1355 1356 1357 1358 1359
      Chu1 = new Chunk(" Window",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
1360
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1361 1362 1363 1364 1365
      Chu1 = new Chunk(" MS-Word",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
1366
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1367 1368 1369 1370 1371
      Chu1 = new Chunk(" MS-Excel",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
1372
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1373 1374 1375 1376 1377
      Chu1 = new Chunk(" MS-Access",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
1378
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1379 1380 1381 1382 1383
      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) );
1384
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1385 1386 1387 1388 1389
      Chu1 = new Chunk(" OfficeTie",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
1390
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1391 1392 1393 1394 1395
      Chu1 = new Chunk(" Linux",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
1396
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1397 1398 1399 1400 1401 1402
      Chu1 = new Chunk(" JAVA,HTML",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );

1403
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1404 1405 1406 1407 1408
      Chu1 = new Chunk(" PhotoShop",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
1409
      Chu0 = new Chunk(AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1410 1411 1412 1413 1414 1415 1416 1417
      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 -----------------
1418 1419 1420 1421 1422
      Boolean car_driving = simmapplicantwithgson.mdrop_resumeSkill.vehicle.car.driving;
      Boolean car_own = simmapplicantwithgson.mdrop_resumeSkill.vehicle.car.own;
      Boolean motorcycle_driving =simmapplicantwithgson.mdrop_resumeSkill.vehicle.motorcycle.driving;
      Boolean motorcycle_own =simmapplicantwithgson.mdrop_resumeSkill.vehicle.motorcycle.own;
    
1423 1424 1425 1426 1427 1428 1429 1430
      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);
1431
      detail.addCell(getCellData("รถยนต์", font14B, "R_TOP", "LEFT", "TOP", 0, 0));
1432
      Chu0 = new Chunk(car_driving? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1433 1434 1435 1436
      Chu1 = new Chunk(" ขับได้",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
1437
      detail.addCell(getCellData2( content, "R_TOP", "LEFT", "MIDDLE",  1,  1) );
1438
      Chu0 = new Chunk(!car_driving? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1439 1440 1441 1442
      Chu1 = new Chunk(" ขับไม่ได้",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
1443
      detail.addCell(getCellData2( content, "R_TOP", "LEFT", "MIDDLE",  1,  1) );
1444
      Chu0 = new Chunk(car_own? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1445 1446 1447 1448
      Chu1 = new Chunk(" มีรถ",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
1449
      detail.addCell(getCellData2( content, "R_TOP", "LEFT", "MIDDLE",  1,  1) );
1450
      Chu0 = new Chunk(!car_own? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1451 1452 1453 1454
      Chu1 = new Chunk(" ไม่มีรถ",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
1455
      detail.addCell(getCellData2( content, "R_TOP", "LEFT", "MIDDLE",  1,  1) );
1456

1457
      detail.addCell(getCellData("รถจักรยานยนต์", font14B, "R_TOP", "LEFT", "TOP", 0, 0));
1458
      Chu0 = new Chunk(motorcycle_driving? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1459 1460 1461 1462
      Chu1 = new Chunk(" ขับได้",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
1463
      detail.addCell(getCellData2( content, "R_TOP", "LEFT", "MIDDLE",  1,  1) );
1464
      Chu0 = new Chunk(!motorcycle_driving? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1465 1466 1467 1468
      Chu1 = new Chunk(" ขับไม่ได้",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
1469
      detail.addCell(getCellData2( content, "R_TOP", "LEFT", "MIDDLE",  1,  1) );
1470
      Chu0 = new Chunk(motorcycle_own? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1471 1472 1473 1474
      Chu1 = new Chunk(" มีรถ",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
1475
      detail.addCell(getCellData2( content, "R_TOP", "LEFT", "MIDDLE",  1,  1) );
1476
      Chu0 = new Chunk(!motorcycle_own? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome);
1477 1478 1479 1480
      Chu1 = new Chunk(" ไม่มีรถ",font12N);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
1481
      detail.addCell(getCellData2( content, "R_TOP", "LEFT", "MIDDLE",  1,  1) );
1482 1483 1484 1485
      document.add(detail);    

      // --------------- new line -----------------
      String[] level = {" ดีมาก   ", " ดี   ", " ปานกลาง   ", " พอใช้"};
1486 1487
      String[] idlang = {"EN","CH"};
      String[] langSkill = {"ภาษาอังกฤษ","ภาษาจีน"};
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500
      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));

1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569
        detail.addCell(getCellData(langSkill[0], font14B, "", "LEFT", "TOP", 0, 0));
        content = new Phrase();
        content.add(new Chunk(hmlangskill.get("speak"+idlang[0]).toString().equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[0],font12N));
        content.add(new Chunk(hmlangskill.get("speak"+idlang[0]).toString().equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[1],font12N));
        content.add(new Chunk(hmlangskill.get("speak"+idlang[0]).toString().equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[2],font12N));
        content.add(new Chunk(hmlangskill.get("speak"+idlang[0]).toString().equalsIgnoreCase("4")? 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(hmlangskill.get("reading"+idlang[0]).toString().equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[0],font12N));
        content.add(new Chunk(hmlangskill.get("reading"+idlang[0]).toString().equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[1],font12N));
        content.add(new Chunk(hmlangskill.get("reading"+idlang[0]).toString().equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[2],font12N));
        content.add(new Chunk(hmlangskill.get("reading"+idlang[0]).toString().equalsIgnoreCase("4")? 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(hmlangskill.get("write"+idlang[0]).toString().equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[0],font12N));
        content.add(new Chunk(hmlangskill.get("write"+idlang[0]).toString().equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[1],font12N));
        content.add(new Chunk(hmlangskill.get("write"+idlang[0]).toString().equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[2],font12N));
        content.add(new Chunk(hmlangskill.get("write"+idlang[0]).toString().equalsIgnoreCase("4")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[3],font12N));
        detail.addCell(getCellData2( content, "", "LEFT", "MIDDLE",  1,  1) );

        detail.addCell(getCellData(langSkill[1], font14B, "", "LEFT", "TOP", 0, 0));
        content = new Phrase();
        content.add(new Chunk(hmlangskill.get("speak"+idlang[1]).toString().equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[0],font12N));
        content.add(new Chunk(hmlangskill.get("speak"+idlang[1]).toString().equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[1],font12N));
        content.add(new Chunk(hmlangskill.get("speak"+idlang[1]).toString().equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[2],font12N));
        content.add(new Chunk(hmlangskill.get("speak"+idlang[1]).toString().equalsIgnoreCase("4")? 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(hmlangskill.get("reading"+idlang[1]).toString().equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[0],font12N));
        content.add(new Chunk(hmlangskill.get("reading"+idlang[1]).toString().equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[1],font12N));
        content.add(new Chunk(hmlangskill.get("reading"+idlang[1]).toString().equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[2],font12N));
        content.add(new Chunk(hmlangskill.get("reading"+idlang[1]).toString().equalsIgnoreCase("4")? 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(hmlangskill.get("write"+idlang[1]).toString().equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[0],font12N));
        content.add(new Chunk(hmlangskill.get("write"+idlang[1]).toString().equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[1],font12N));
        content.add(new Chunk(hmlangskill.get("write"+idlang[1]).toString().equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[2],font12N));
        content.add(new Chunk(hmlangskill.get("write"+idlang[1]).toString().equalsIgnoreCase("4")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
        content.add(new Chunk(level[3],font12N));
        detail.addCell(getCellData2( content, "", "LEFT", "MIDDLE",  1,  1) );
      for(int num=0;num < 2;num++ ){
        detail.addCell(getCellData(String.valueOf(hmlangskill.get("skillname"+num)), font14B, "", "LEFT", "TOP", 0, 0));
1570 1571

        content = new Phrase();
1572
        content.add(new Chunk(hmlangskill.get("speak"+num).toString().equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1573
        content.add(new Chunk(level[0],font12N));
1574
        content.add(new Chunk(hmlangskill.get("speak"+num).toString().equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1575
        content.add(new Chunk(level[1],font12N));
1576
        content.add(new Chunk(hmlangskill.get("speak"+num).toString().equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1577
        content.add(new Chunk(level[2],font12N));
1578
        content.add(new Chunk(hmlangskill.get("speak"+num).toString().equalsIgnoreCase("4")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1579 1580 1581 1582
        content.add(new Chunk(level[3],font12N));
        detail.addCell(getCellData2( content, "", "LEFT", "MIDDLE",  1,  1) );

        content = new Phrase();
1583
        content.add(new Chunk(hmlangskill.get("reading"+num).toString().equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1584
        content.add(new Chunk(level[0],font12N));
1585
        content.add(new Chunk(hmlangskill.get("reading"+num).toString().equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1586
        content.add(new Chunk(level[1],font12N));
1587
        content.add(new Chunk(hmlangskill.get("reading"+num).toString().equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1588
        content.add(new Chunk(level[2],font12N));
1589
        content.add(new Chunk(hmlangskill.get("reading"+num).toString().equalsIgnoreCase("4")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1590 1591 1592 1593
        content.add(new Chunk(level[3],font12N));
        detail.addCell(getCellData2( content, "", "LEFT", "MIDDLE",  1,  1) );

        content = new Phrase();
1594
        content.add(new Chunk(hmlangskill.get("write"+num).toString().equalsIgnoreCase("1")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1595
        content.add(new Chunk(level[0],font12N));
1596
        content.add(new Chunk(hmlangskill.get("write"+num).toString().equalsIgnoreCase("2")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1597
        content.add(new Chunk(level[1],font12N));
1598
        content.add(new Chunk(hmlangskill.get("write"+num).toString().equalsIgnoreCase("3")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1599
        content.add(new Chunk(level[2],font12N));
1600
        content.add(new Chunk(hmlangskill.get("write"+num).toString().equalsIgnoreCase("4")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1601 1602 1603 1604 1605 1606 1607
        content.add(new Chunk(level[3],font12N));
        detail.addCell(getCellData2( content, "", "LEFT", "MIDDLE",  1,  1) );
      }
      document.add(detail); 
      // PAGE 3
      document.newPage();
      // --------------- new line -----------------
1608
      sizeColumn = new float[]{10.0f,12.0f,10.0f,10.0f,10.0f,10.0f,10.0f,10.0f};
1609
      detail = new PdfPTable(8);
1610 1611 1612 1613 1614 1615
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      setPaddingTop(2.5f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
      setPaddingBottom(5.5f);
1616
      detail.addCell(getCellData("ประวัติการทำงาน (ให้ระบุที่ทำงานแห่งแรกถึงที่ทำงานปัจจุบันตามลำดับ)", font14B, "", "CENTER", "MIDDLE", 8, 0,false,true));
1617 1618 1619
      setPaddingTop(0.5f);
      setPaddingBottom(2.5f);
      for(int num=0;num < 3;num++ ){
1620
        detail.addCell(getCellData("บริษัท", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
1621
        detail.addCell(getCellData(jobexp.get("companyname_job"+num).toString(), font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 2, 0));
1622
        detail.addCell(getCellData("ที่อยู่", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
1623
        detail.addCell(getCellData("...", font12N, "NO", "LEFT", "MIDDLE", 4, 0));
1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640
        detail.addCell(getCellData("โทรศัพท์", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData(jobexp.get("phoneJob"+num).toString(), font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData("ลักษณะธุรกิจ", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData(jobexp.get("natureBusiness"+num).toString(), font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData("ตำแหน่งเริ่มต้น", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData(jobexp.get("description"+num).toString(), font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData("ตำแหน่งสุดท้าย", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData("...", font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData("เริ่ม "+jobexp.get("start"+num).toString(), font12N, "NO", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData("ถึง "+jobexp.get("end"+num).toString(), font12N, "NO", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData("เงินเดือนเริ่มต้น ", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData(jobexp.get("salary"+num) + "   บาท", font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 2, 0));
        detail.addCell(getCellData("้เงินเดือนสุดท้าย ", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData(jobexp.get("endingsalary"+num) + "   บาท", font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 2, 0));

        detail.addCell(getCellData("สาเหตุที่ลาออก", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData(jobexp.get("reason"+num).toString(), font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 7, 0));
1641
      }
1642
      detail.addCell(getCellData(" ", font12N, "NO", "CENTER", "MIDDLE", 8, 0));
1643 1644 1645
      document.add(detail);

      // --------------- new line -----------------
1646 1647
      String local =simmapplicantwithgson.mdrop_resumeOther.distinguished.local;
      String inter =simmapplicantwithgson.mdrop_resumeOther.distinguished.inter;
1648 1649 1650 1651 1652 1653 1654
      sizeColumn = new float[]{100.0f};
      detail = new PdfPTable(1);
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      setPaddingTop(3.5f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
1655
      setPaddingBottom(3.5f);
1656
      detail.addCell(getCellData("อธิบายลักษณะงานที่เคยทำผ่านมา / ลักษณะงานที่ทำได้", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
1657 1658
      
      for(int num=0;num < 9;num++ ){
1659
        detail.addCell(getCellData(String.valueOf(num+1) + local, font12N, "NO", "LEFT", "MIDDLE", 0, 0));
1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670
      }
      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);
1671
      setPaddingBottom(3.5f);
1672 1673 1674 1675
      detail.addCell(getCellData("ประวัติการฝึกอบรม", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
      detail.addCell(getCellData("สถาบันที่จัดฝึกอบรม", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
      detail.addCell(getCellData("ปี พ.ศ.", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
      detail.addCell(getCellData("ระยะเวลา", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
1676
      for(int num=0;num < 5;num++ ){
1677 1678 1679 1680
        detail.addCell(getCellData(String.valueOf(num+1)+". " + trainingHM.get("name"+num).toString(), font12N, "R_RIGHT", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData(trainingHM.get("by"+num).toString(), font12N, "R_RIGHT", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData(trainingHM.get("year"+num).toString(), font12N, "R_RIGHT", "LEFT", "MIDDLE", 1, 0));
        detail.addCell(getCellData(trainingHM.get("countday"+num).toString(), font12N, "NO", "LEFT", "MIDDLE", 1, 0));
1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691
      }
      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);
1692
      detail.addCell(getCellData("บุคคลที่อ้างอิง (ให้ระบุบุคคลที่ไม่ใช่ญาติพี่น้อง หรือนายจ้างเดิม ซึ่งสามารถสอบถามและให้คำรับรองได้)", font14B, "", "CENTER", "MIDDLE", 4, 0,false,true));
1693 1694 1695 1696 1697
      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++ ){
1698 1699 1700 1701
        detail.addCell(getCellData(String.valueOf(num+1) + " " + personreference.get("name"+num).toString(), font12N, "R_RIGHT", "LEFT", "MIDDLE", 0, 0));
        detail.addCell(getCellData(personreference.get("relations"+num).toString(), font12N, "R_RIGHT", "LEFT", "MIDDLE", 0, 0));
        detail.addCell(getCellData(personreference.get("jobtitle"+num).toString(), font12N, "R_RIGHT", "LEFT", "MIDDLE", 0, 0));
        detail.addCell(getCellData(personreference.get("address"+num).toString() + " / " + personreference.get("phone"+num).toString(), font12N, "NO", "LEFT", "MIDDLE", 0, 0));
1702 1703 1704 1705
      }
      document.add(detail);
      
      // --------------- new line -----------------
1706
      String visiononjob =simmapplicantwithgson.mdrop_resumeOther.visiononjob;
1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719
      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));
1720 1721
      for(int num=0;num < 1;num++ ){
        detail.addCell(getCellData(visiononjob, font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 0, 0));
1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735
      }
      document.add(detail);

      // PAGE 4
      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);
1736
      detail.addCell(getCellData("ประวัติทั่วไป", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
1737 1738 1739
      document.add(detail);

      // --------------- new line -----------------
1740 1741 1742 1743 1744 1745
      Boolean applyStatus =  simmapplicantwithgson.mdrop_resumeOther.apply;
      String applyPosition = simmapplicantwithgson.mdrop_resumeOther.applyDesc.position;
      String applyYear = simmapplicantwithgson.mdrop_resumeOther.applyDesc.year;
      Boolean tradeStatus =  simmapplicantwithgson.mdrop_resumeOther.tradeUnion.status;
      String tradeName = simmapplicantwithgson.mdrop_resumeOther.tradeUnion.name;
      String tradeRole = simmapplicantwithgson.mdrop_resumeOther.tradeUnion.role;
1746 1747
      sizeColumn = new float[]{20.0f,5.0f,5.0f,6.0f,12.0f,7.0f,3.0f,9.0f};
      detail = new PdfPTable(8);
1748 1749 1750 1751 1752 1753 1754 1755
      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));
      content = new Phrase();
1756
      content.add(new Chunk(!applyStatus? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1757 1758 1759
      content.add(new Chunk(" ไม่เคย",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
1760
      content.add(new Chunk(applyStatus? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1761 1762 1763
      content.add(new Chunk(" เคย",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      detail.addCell(getCellData("ตำแหน่ง", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
1764
      detail.addCell(getCellData(applyStatus?applyPosition:"", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
1765
      detail.addCell(getCellData("ระยะเวลา", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
1766 1767
      detail.addCell(getCellData(applyStatus?applyYear:"", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("  เดือน / ปี", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
1768 1769 1770

      detail.addCell(getCellData("การรู้จักพนักงานของบริษัทฯนี้ท่าน", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      content = new Phrase();
1771
      content.add(new Chunk(!(roundComReference > 0)? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1772 1773 1774
      content.add(new Chunk(" ไม่รู้",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
1775
      content.add(new Chunk((roundComReference > 0)? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1776 1777 1778
      content.add(new Chunk(" รู้",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      detail.addCell(getCellData("ชื่อ-สกุล", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
1779
      detail.addCell(getCellData(companyReference.getString("fullname0"), font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
1780
      detail.addCell(getCellData("ตำแหน่ง", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
1781
      detail.addCell(getCellData(companyReference.getString("position0"), font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 2, 0));
1782 1783 1784

      detail.addCell(getCellData("การเป็นสมาชิกของชมรม / สหภาพ / สโมสรท่าน", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      content = new Phrase();
1785
      content.add(new Chunk(!tradeStatus? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1786 1787 1788
      content.add(new Chunk(" ไม่เคย",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
1789
      content.add(new Chunk(tradeStatus? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1790 1791 1792
      content.add(new Chunk(" เคย",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      detail.addCell(getCellData("ชื่อสถาบัน", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
1793
      detail.addCell(getCellData(tradeStatus?tradeName:"", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
1794
      detail.addCell(getCellData("ตำแหน่ง", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
1795
      detail.addCell(getCellData(tradeStatus?tradeRole:"", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 2, 0));
1796 1797 1798 1799 1800 1801
      document.add(detail);

      // --------------- new line -----------------shiftwork
      Boolean shiftwork = simmapplicantwithgson.mdrop_resumeOther.shiftwork;
      Boolean overtime_status = simmapplicantwithgson.mdrop_resumeOther.overtime.status;
      String overtime = simmapplicantwithgson.mdrop_resumeOther.overtime.explain;
1802
      Boolean ordination = simmapplicantwithgson.mdrop_resumeOther.ordination;
1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833
      sizeColumn = new float[]{10.0f,5.0f,5.0f,15.0f,5.0f,5.0f,5.0f,10.0f};
      detail = new PdfPTable(8);
      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));
      content = new Phrase();
      content.add(new Chunk(shiftwork? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" ทำได้",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
      content.add(new Chunk(!shiftwork? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" ทำไม่ได้",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      detail.addCell(getCellData("การทำงานล่วงเวลาลักษณะงานท่าน", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      content = new Phrase();
      content.add(new Chunk(overtime_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" ทำได้",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
      content.add(new Chunk(!overtime_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" ทำไม่ได้",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      detail.addCell(getCellData("เพราะ", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData(overtime, font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 0, 0));

      detail.addCell(getCellData("การอุปสมบท ท่าน", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      content = new Phrase();
1834
      content.add(new Chunk(!ordination? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1835 1836 1837
      content.add(new Chunk(" ยัง",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
1838
      content.add(new Chunk(ordination? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890
      content.add(new Chunk(" อุปสมบทแล้ว",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  6,  1) );
      document.add(detail);

      // --------------- new line ----------------- 
      sizeColumn = new float[]{17.0f,5.0f,5.0f,4.0f,5.0f,5.0f,10.0f,12.5f};
      detail = new PdfPTable(8);
      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));
      content = new Phrase();
      content.add(new Chunk(personal_status.equalsIgnoreCase("S")? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" ไม่ไป",font12N));  
      detail.addCell(getCellData2( content, "NO", "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(" ไป",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      detail.addCell(getCellData("จำนวน", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("...", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("ครั้ง / ปี", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("โดยไปที่ประเทศ", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("...", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      document.add(detail);

      // --------------- new line ----------------- 
      sizeColumn = new float[]{35.0f,8.0f,8.0f,15.0f,30.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("การถูกฟ้องร้อง / อยู่ในระหว่างพิจารณาคดีของศาล ท่าน", font12N, "NO", "LEFT", "MIDDLE", 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(" ไม่มี",font12N));  
      detail.addCell(getCellData2( content, "NO", "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(" มี",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      detail.addCell(getCellData("คดีเพ่ง / อาญา เรื่อง", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("...", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      document.add(detail);

      // --------------- new line ----------------- 
1891 1892
      Boolean policecapture_status = simmapplicantwithgson.mdrop_resumeOther.policecapture.status;
      String policecapture = simmapplicantwithgson.mdrop_resumeOther.policecapture.explain;
1893 1894 1895 1896 1897 1898 1899 1900 1901 1902
      sizeColumn = new float[]{15.0f,8.0f,8.0f,20.0f,10.0f,30.0f};
      detail = new PdfPTable(6);
      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));
      content = new Phrase();
1903
      content.add(new Chunk(!policecapture_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1904 1905 1906
      content.add(new Chunk(" ไม่เคย",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
1907
      content.add(new Chunk(policecapture_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1908 1909
      content.add(new Chunk(" เคย คดี",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
1910
      detail.addCell(getCellData(policecapture, font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 0, 0));
1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968
      detail.addCell(getCellData("โทษที่ได้รับ", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("...", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      document.add(detail);

      // --------------- new line ----------------- 
      Boolean drinkalcohol = simmapplicantwithgson.mdrop_resumeOther.drinkalcohol;
      Boolean smoking = simmapplicantwithgson.mdrop_resumeOther.smoking.status;
      sizeColumn = new float[]{15.0f,8.0f,8.0f,20.0f,10.0f,30.0f};
      detail = new PdfPTable(6);
      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));
      content = new Phrase();
      content.add(new Chunk(!drinkalcohol? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" ไม่ดื่ม",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
      content.add(new Chunk(drinkalcohol? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" ดื่ม",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      detail.addCell(getCellData("การสูบบุหรี่ ท่าน", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      content = new Phrase();
      content.add(new Chunk(!smoking? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" ไม่สูบ",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
      content.add(new Chunk(smoking? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" สูบ",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      document.add(detail);
      // --------------- new line ----------------- 
      Boolean health_status =simmapplicantwithgson.mdrop_resumeOther.health.status;
      String health =simmapplicantwithgson.mdrop_resumeOther.health.explain;
      sizeColumn = new float[]{15.0f,8.0f,8.0f,20.0f,10.0f,30.0f};
      detail = new PdfPTable(6);
      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));
      content = new Phrase();
      content.add(new Chunk(!health_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" ไม่มี",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
      content.add(new Chunk(health_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
      content.add(new Chunk(" มี โรค",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      detail.addCell(getCellData(health, font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 3, 0));
      document.add(detail);

      // --------------- new line ----------------- 
1969 1970
      Boolean pregnant_status =simmapplicantwithgson.mdrop_resumeOther.pregnant.status;
      String pregnant =simmapplicantwithgson.mdrop_resumeOther.pregnant.months;
1971 1972
      Boolean surgical_status =simmapplicantwithgson.mdrop_resumeOther.surgical.status;
      String surgical =simmapplicantwithgson.mdrop_resumeOther.surgical.explain;
1973 1974 1975 1976 1977 1978 1979 1980 1981 1982
      sizeColumn = new float[]{20.0f,8.0f,14.0f,14.0f,20.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(6.5f);
      detail.addCell(getCellData("ขณะนี้ท่านตั้งครรภ์อยู่หรือไม่", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      content = new Phrase();
1983
      content.add(new Chunk(!pregnant_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1984 1985 1986
      content.add(new Chunk(" ไม่ใช่",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
1987
      content.add(new Chunk(pregnant_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1988 1989
      content.add(new Chunk(" ใช่ อายุครรภ์",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
1990
      detail.addCell(getCellData(pregnant_status?pregnant :"", font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 1, 0));
1991 1992 1993 1994
      detail.addCell(getCellData("เดือน", font12N, "NO", "LEFT", "MIDDLE", 3, 0));

      detail.addCell(getCellData("การเจ็บป่วยหนัก / อุบัติเหตุ ท่าน", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      content = new Phrase();
1995
      content.add(new Chunk(!surgical_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
1996 1997 1998
      content.add(new Chunk(" ไม่เคย",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
1999
      content.add(new Chunk(surgical_status? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
2000 2001
      content.add(new Chunk(" เคย โรค / อุบัติเหตุ",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
2002
      detail.addCell(getCellData(surgical, font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 2, 0));
2003
      detail.addCell(getCellData("เมื่อปี พ.ศ.", font12N, "NO", "LEFT", "MIDDLE", 1, 0));
2004
      detail.addCell(getCellData("...", font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 1, 0));
2005 2006 2007
      document.add(detail);

      // --------------- new line ----------------- 
2008
      Boolean guarantees = simmapplicantwithgson.mdrop_resumeOther.guarantees;
2009 2010 2011 2012 2013 2014 2015 2016 2017 2018
      sizeColumn = new float[]{35.0f,10.0f,60.0f};
      detail = new PdfPTable(3);
      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));
      content = new Phrase();
2019
      content.add(new Chunk(!guarantees? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
2020 2021 2022
      content.add(new Chunk(" ไม่ได้",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );
      content = new Phrase();
2023
      content.add(new Chunk(guarantees? AwesomeIcons.ICON_CHECK:AwesomeIcons.ICON_CHECK_EMPTY,fontAwesome));
2024 2025 2026 2027 2028
      content.add(new Chunk(" ได้",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );  
      document.add(detail);

      // --------------- new line ----------------- 
2029
      String readytowork =simmapplicantwithgson.mdrop_resumeOther.presentemployer;  
2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056
      sizeColumn = new float[]{25.0f,20.0f,15.0f,15.0f,30.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("ท่าตั้งใจจะทำงานกับบริษัทฯที่ ", font12N, "NO", "LEFT", "MIDDLE", 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(" สำนักงานสุรวงศ์",font12N));  
      detail.addCell(getCellData2( content, "NO", "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(" โรงงาน 1",font12N));  
      detail.addCell(getCellData2( content, "NO", "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(" โรงงาน 2",font12N));  
      detail.addCell(getCellData2( content, "NO", "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(" ศูนย์คลังสินค้าและบริการ",font12N));  
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  1,  1) );  

      detail.addCell(getCellData("กรณีบริษัทฯ ตกลงรับท่านเข้าทำงาน ท่านพร้อมที่จะเริ่มงานได้ภายใน", font12N, "NO", "LEFT", "MIDDLE", 2, 0));
2057
      detail.addCell(getCellData(readytowork, font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067
      Chu0 = new Chunk("วัน",font12N);
      Chu1 = new Chunk(" / เดือน",font12N);
      Chu0.setUnderline(0.1f, -2f);
      content = new Phrase();
      content.add(Chu0);
      content.add(Chu1);
      detail.addCell(getCellData2( content, "NO", "LEFT", "MIDDLE",  2,  1) );
      setPaddingTop(0.5f);
      setPaddingBottom(0.5f);
      detail.addCell(getCellData(" ", font12N, "NO", "LEFT", "MIDDLE", 5, 0));
2068 2069 2070 2071 2072 2073 2074
      document.add(detail);

      // --------------- new line ----------------- 
      sizeColumn = new float[]{100.0f};
      detail = new PdfPTable(1);
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
2075
      setPaddingTop(0.5f);
2076 2077
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
2078
      setPaddingBottom(0.5f);
2079 2080
      detail.addCell(getCellData(" ", font12N, "R_TOP", "LEFT", "MIDDLE", 0, 0));
      setPaddingTop(3.5f);
2081 2082 2083 2084 2085 2086
      setPaddingBottom(3.5f);
      detail.addCell(getCellData("       ข้าพเจ้าขอรับรองว่าข้อความและรายละเอียดต่าง ๆ  ที่ได้ให้ไว้ข้างต้นนี้เป็นความจริงทุกประการ  และข้าพเจ้าขอยืนยันว่าข้าพเจ้ายินดีให้ทางบริษัทฯ  ตรวจสอบ", font12B, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("ข้อความต่าง ๆ ได้ และถ้าหากตรวจสอบพบว่าข้อความใดเป็นเท็จก็ให้ทางบริษัทฯ ถือเป็นสาเหตุการบอกยกเลิกการว่าจ้างข้าพเจ้าได้ทันทีโดยไม่ต้องจ่ายค่าชดเชย", font12B, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("ใด ๆ ทั้งสิ้น รวมถึงในกรณีที่ข้าพเจ้าได้สร้างสรรค์งานอันมีลิขสิทธ์ประเภทใด ๆ ขึ้นในฐานะลูกจ้างประเภททดลองงานก็ดี และ / หรือในฐานะพนักงานประจำซึ่งได้รับ", font12B, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("การบรรจุแล้วก็ดี ให้ถือว่าลิขสิทธ์ในงานที่ได้สร้างสรรค์ขึ้นทั้งหมดเป็นของบริษัทฯ ซึ่งเป็นนายจ้างทั้งสิ้น ทั้งนี้ไม่ว่าข้าพเจ้าจะพ้นสภาพการเป็นลูกจ้างประเภททดลองงาน", font12B, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("หรือพนักงานประจำของบริษัทฯ ไปแล้วหรือไม่ก็ตาม", font12B, "NO", "LEFT", "MIDDLE", 0, 0));
2087 2088 2089 2090 2091 2092 2093
      document.add(detail);

      // --------------- new line ----------------- 
      sizeColumn = new float[]{5.0f,5.0f,6.0f,15.0f,6.0f,8.0f,12.0f,40.0f,6.0f};
      detail = new PdfPTable(9);
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
2094
      setPaddingTop(8.5f);
2095 2096
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
2097 2098 2099 2100 2101 2102
      setPaddingBottom(2.5f);
      detail.addCell(getCellData("", font12N, "NO", "CENTER", "MIDDLE", 6, 0));
      detail.addCell(getCellData("ลงชื่อ", font12N, "NO", "RIGHT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("", font12N, "NO", "LEFT", "MIDDLE", 0, 0));

2103 2104 2105 2106 2107 2108 2109 2110 2111 2112
      detail.addCell(getCellData("วันที่", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("เดือน", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("พ.ศ.", font12N, "NO", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("(", font12N, "NO", "RIGHT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData(")", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData(" ", font12N, "NO", "LEFT", "MIDDLE", 9, 0));
2113 2114
      document.add(detail);

2115 2116 2117 2118 2119 2120 2121 2122 2123
      // --------------- 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);
2124
      detail.addCell(getCellData("สำหรับเจ้าหน้าที่เท่านั้น", font14B, "", "CENTER", "MIDDLE", 0, 0,false,true));
2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153
      document.add(detail);

      // --------------- new line ----------------- 
      sizeColumn = new float[]{5.0f,6.0f,6.0f,6.0f,75.0f};
      detail = new PdfPTable(5);
      detail.setWidthPercentage(100);
      detail.setWidths(sizeColumn);
      setPaddingTop(3.5f);
      setPaddingLeft(3.5f);
      setPaddingRight(3.5f);
      setPaddingBottom(1.5f);
      detail.addCell(getCellData(AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("รูปถ่าย", font12N, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData(" ", font12N, "R_BOTTOM_DOT", "CENTER", "MIDDLE", 0, 0));
      detail.addCell(getCellData("ใบ", font12N, "NO", "LEFT", "MIDDLE", 2, 0));

      detail.addCell(getCellData(AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("สำเนาบัตรประชน", font12N, "NO", "LEFT", "MIDDLE", 4, 0));
      detail.addCell(getCellData(AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("สำเนาทะเบียนบ้าน", font12N, "NO", "LEFT", "MIDDLE", 4, 0));
      detail.addCell(getCellData(AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("สำเนาหลักฐานการศึกษา", font12N, "NO", "LEFT", "MIDDLE", 4, 0));
      detail.addCell(getCellData(AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("สำเนาหลักฐานทางราชการทหาร", font12N, "NO", "LEFT", "MIDDLE", 4, 0));
      detail.addCell(getCellData(AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("สำเนาใบผ่านงาน (ถ้ามี)", font12N, "NO", "LEFT", "MIDDLE", 4, 0));
      detail.addCell(getCellData(AwesomeIcons.ICON_CHECK_EMPTY, fontAwesome, "NO", "LEFT", "MIDDLE", 0, 0));
      detail.addCell(getCellData("เอกสารอื่น ๆ ประกอบ (ถ้ามี)", font12N, "NO", "LEFT", "MIDDLE", 3, 0));
      detail.addCell(getCellData(" ", font12N, "R_BOTTOM_DOT", "LEFT", "MIDDLE", 0, 0));
2154
      document.add(detail);
2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196

        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            document.close();
        }
    }

    if (hasData) {
        OutputStream os = response.getOutputStream();
        // Create a reader
        PdfReader reader = new PdfReader(baos.toByteArray());
        // Create a stamper
        PdfStamper stamper = new PdfStamper(reader, baos);

        // Close the stamper
        stamper.close();
        reader.close();

        response.setHeader("Expires", "0");
        response.setHeader("Cache-Control", "must-revalidate, post-check=0 , pre-check=0");
        response.setHeader("Pragma", "public");
        // setting the content type
        response.setContentType("application/pdf");
        // the contentlength
        response.setContentLength(baos.size());
        // write ByteArrayOutputStream to the ServletOutputStream

        baos.writeTo(os);

        os.flush();
        os.close();
    }

%>

<%!
    Float padding = 0.0f;
    Float paddingtop = 0.0f;
    Float paddingbottom = 0.0f;
    Float paddingleft = 0.0f;
    Float paddingright = 0.0f;
2197
    BaseColor basecolor = new BaseColor(230, 230, 230);
2198

2199 2200
    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);
2201
    }
2202 2203 2204 2205 2206 2207
   
    //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);
2208 2209 2210
      LineDash solid = new SolidLine();
      LineDash dotted = new DottedLine();
      LineDash dashed = new DashedLine();
2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289
      if (horalign.equalsIgnoreCase("LEFT")) {
        cellDetail.setHorizontalAlignment(Element.ALIGN_LEFT);
      } else if (horalign.equalsIgnoreCase("CENTER")) {
        cellDetail.setHorizontalAlignment(Element.ALIGN_CENTER);
      } else if (horalign.equalsIgnoreCase("RIGHT")) {
        cellDetail.setHorizontalAlignment(Element.ALIGN_RIGHT);
      }

      if (veralign.equalsIgnoreCase("TOP")) {
        cellDetail.setVerticalAlignment(Element.ALIGN_TOP);
      } else if (veralign.equalsIgnoreCase("MIDDLE")) {
        cellDetail.setVerticalAlignment(Element.ALIGN_MIDDLE);
      } else if (veralign.equalsIgnoreCase("BOTTOM")) {
        cellDetail.setVerticalAlignment(Element.ALIGN_BOTTOM);
      }

      if (padding > 0.0f) {
        cellDetail.setPadding(padding);
      }
      if (paddingtop > 0.0f) {
        cellDetail.setPaddingTop(paddingtop);
      }
      if (paddingbottom > 0.0f) {
        cellDetail.setPaddingBottom(paddingbottom);
      }
      if (paddingleft > 0.0f) {
        cellDetail.setPaddingLeft(paddingleft);
      }
      if (paddingright > 0.0f) {
        cellDetail.setPaddingRight(paddingright);
      }
      if (colspan > 0) {
        cellDetail.setColspan(colspan);
      }
      if (rowspan > 0) {
        cellDetail.setRowspan(rowspan);
      }

      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);
2290 2291 2292 2293
      }
       else if(noborder.equalsIgnoreCase("R_BOTTOM_DOT")){ 
            cellDetail.setBorder(PdfPCell.NO_BORDER);
            cellDetail.setCellEvent(new CustomBorder(null, null, null, dotted));
2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355
      }
      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);
      }
2356 2357 2358
      else if(noborder.equalsIgnoreCase("R_TOP")){ 
            cellDetail2.setBorder(Rectangle.TOP );
      }
2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400
      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;
2401 2402
    }
    private void setPadding(Float padding) {
2403
      this.padding = padding;
2404 2405 2406
    }

    private void setPaddingTop(Float padding) {
2407
      this.paddingtop = padding;
2408 2409 2410
    }

    private void setPaddingBottom(Float padding) {
2411
      this.paddingbottom = padding;
2412 2413 2414
    }

    private void setPaddingLeft(Float padding) {
2415
      this.paddingleft = padding;
2416 2417 2418
    }

    private void setPaddingRight(Float padding) {
2419
      this.paddingright = padding;
2420 2421 2422
    }

    private void setBaseBackgroundColor(int r, int g, int b) {
2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494
      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();
            }
        }
2495 2496
    }

2497 2498 2499 2500 2501 2502 2503 2504 2505
   // 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;
    }
2506 2507 2508 2509 2510

%>

</body>
</html>