#9569 UPLOAD PICTURE

parent fa6883f2
var urljobboard = "http://10.1.1.34:9092";
var urljobboard = "http://10.1.1.34:9092/";
......@@ -646,14 +646,42 @@
printby = screen.getUProfile().get("efullname");
refer_label = "Ref #";
}
// --------------- 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);
// --------------- new line -----------------
// --------------- new line -----------------
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
PdfPTable detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
PdfPCell cellDetail;
Image img = null;
setPaddingTop(0.5f);
setPaddingLeft(0.0f);
......@@ -662,7 +690,7 @@
detail.addCell(getCellData("FR-710-007 / Revision No. : 01", font12N, "NO", "RIGHT", "TOP", 0, 0));
detail.addCell(getCellData("Effective Date : 12/05/09", font12N, "NO", "RIGHT", "TOP", 0, 0));
setPaddingTop(30.5f);
setPaddingTop(10.5f);
detail.addCell(getCellData("ใบสมัครงาน", font20B, "NO", "CENTER", "TOP", 0, 0));
setPaddingTop(10.5f);
......@@ -670,6 +698,9 @@
setPaddingTop(0.5f);
detail.addCell(getCellData("วันที่รับสมัคร"+".....................", font12N, "NO", "RIGHT", "TOP", 0, 0));
detail.addCell(getCellData("แหล่งที่ทราบข่าว"+".....................", font12N, "NO", "RIGHT", "TOP", 0, 0));
setPaddingTop(50.5f);
setPaddingBottom(4.5f);
detail.addCell(getCellData(" ", font12N, "NO", "RIGHT", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
......
......@@ -649,12 +649,42 @@
refer_label = "Ref #";
}
// --------------- 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);
// --------------- new line -----------------
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
PdfPTable detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
PdfPCell cellDetail;
Image img = null;
setPaddingTop(0.5f);
setPaddingLeft(0.0f);
......@@ -663,7 +693,7 @@
detail.addCell(getCellData("FR-710-007 / Revision No. : 01", font12N, "NO", "RIGHT", "TOP", 0, 0));
detail.addCell(getCellData("Effective Date : 12/05/09", font12N, "NO", "RIGHT", "TOP", 0, 0));
setPaddingTop(30.5f);
setPaddingTop(10.5f);
detail.addCell(getCellData("ใบสมัครงาน", font20B, "NO", "CENTER", "TOP", 0, 0));
setPaddingTop(10.5f);
......@@ -671,6 +701,9 @@
setPaddingTop(0.5f);
detail.addCell(getCellData("วันที่รับสมัคร"+".....................", font12N, "NO", "RIGHT", "TOP", 0, 0));
detail.addCell(getCellData("แหล่งที่ทราบข่าว"+".....................", font12N, "NO", "RIGHT", "TOP", 0, 0));
setPaddingTop(50.5f);
setPaddingBottom(4.5f);
detail.addCell(getCellData(" ", font12N, "NO", "RIGHT", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
......
......@@ -650,40 +650,42 @@ Not found data
}
//--------------- Report Header Logo-----------------
// sizeColumn = new float[] {50.0f,50.0f};
// PdfPTable detail = new PdfPTable(2);
// detail.setWidthPercentage(100);
// detail.setWidths(sizeColumn);
// PdfPCell cellDetail;
// Image img = null;
// setPaddingTop(0.5f);
// setPaddingLeft(0.0f);
// setPaddingRight(0.0f);
// detail.addCell( getCellData("Lesson Plan", font20B, true, "LEFT", "MIDDLE", 1, 0) );
//
// String defaultFile = "default.png";
// String filename = screen.getString("MCOMPANY","logo");
// InitialEnvironment inv = new InitialEnvironment("GLOBAL");
// String path = inv.getValue("COMPANY_UPLOAD-dir")+"LOGO/";
// if (!new File(path+filename).exists() || filename.equals("")){
// filename = defaultFile;
// }
//
// img = Image.getInstance(path+filename);
// cellDetail = new PdfPCell(img, true);
// cellDetail.setHorizontalAlignment(Element.ALIGN_RIGHT);
// cellDetail.setVerticalAlignment(Element.ALIGN_MIDDLE);
// cellDetail.setFixedHeight(40);
// cellDetail.setBorder(Rectangle.NO_BORDER);
// detail.addCell(cellDetail);
// --------------- 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);
// --------------- Report Header -----------------
// --------------- new line -----------------
sizeColumn = new float[]{100.0f};
PdfPTable detail = new PdfPTable(1);
detail.setWidthPercentage(100);
detail.setWidths(sizeColumn);
PdfPCell cellDetail;
Image img = null;
setPaddingTop(0.5f);
setPaddingLeft(0.0f);
......@@ -692,7 +694,7 @@ Not found data
detail.addCell(getCellData("FR-710-007 / Revision No. : 01", font12N, "NO", "RIGHT", "TOP", 0, 0));
detail.addCell(getCellData("Effective Date : 12/05/09", font12N, "NO", "RIGHT", "TOP", 0, 0));
setPaddingTop(30.5f);
setPaddingTop(10.5f);
detail.addCell(getCellData("ใบสมัครงาน", font20B, "NO", "CENTER", "TOP", 0, 0));
setPaddingTop(10.5f);
......@@ -700,6 +702,9 @@ Not found data
setPaddingTop(0.5f);
detail.addCell(getCellData("วันที่รับสมัคร"+".....................", font12N, "NO", "RIGHT", "TOP", 0, 0));
detail.addCell(getCellData("แหล่งที่ทราบข่าว"+".....................", font12N, "NO", "RIGHT", "TOP", 0, 0));
setPaddingTop(50.5f);
setPaddingBottom(4.5f);
detail.addCell(getCellData(" ", font12N, "NO", "RIGHT", "TOP", 0, 0));
document.add(detail);
// --------------- new line -----------------
......@@ -707,7 +712,7 @@ Not found data
detail = new PdfPTable(3);
detail.setWidthPercentage(90);
detail.setWidths(sizeColumn);
setPaddingTop(0.0f);
setPaddingTop(0.5f);
setPaddingLeft(3.5f);
setPaddingRight(3.5f);
setPaddingBottom(4.5f);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment