List of usage examples for com.itextpdf.text Image setBorder
public void setBorder(final int border)
From source file:utils.pdf.cv_templates.Template1.java
private void addImageLine2() throws DocumentException, IOException { Image line_img; line_img = Image//from w w w . j av a 2s. c om .getInstance(String.format("public/images/orientation/cv-templates/CV1/ic_barra_lineas3.png")); line_img.setAbsolutePosition(40, 250); line_img.setAlignment(Image.LEFT | Image.TEXTWRAP); line_img.setBorder(Image.BOX); line_img.setBorderWidth(10); line_img.setBorderColor(BaseColor.WHITE); line_img.scaleToFit(1000, 100); document.add(line_img); }
From source file:utils.pdf.cv_templates.Template1.java
private void addImageLine3() throws DocumentException, IOException { Image line_img; line_img = Image/*from w w w.j a v a 2 s .co m*/ .getInstance(String.format("public/images/orientation/cv-templates/CV1/ic_barra_lineas3.png")); line_img.setAbsolutePosition(40, 350); line_img.setAlignment(Image.LEFT | Image.TEXTWRAP); line_img.setBorder(Image.BOX); line_img.setBorderWidth(10); line_img.setBorderColor(BaseColor.WHITE); line_img.scaleToFit(1000, 100); document.add(line_img); }
From source file:utils.pdf.cv_templates.Template1.java
private void addImageLine4() throws DocumentException, IOException { Image line_img; line_img = Image//from w w w .jav a 2 s .c o m .getInstance(String.format("public/images/orientation/cv-templates/CV1/ic_barra_lineas3.png")); line_img.setAbsolutePosition(40, 450); line_img.setAlignment(Image.LEFT | Image.TEXTWRAP); line_img.setBorder(Image.BOX); line_img.setBorderWidth(10); line_img.setBorderColor(BaseColor.WHITE); line_img.scaleToFit(1000, 100); document.add(line_img); }
From source file:utils.pdf.cv_templates.Template1.java
private void addImageLine5() throws DocumentException, IOException { Image line_img; line_img = Image/*ww w . j av a 2 s . com*/ .getInstance(String.format("public/images/orientation/cv-templates/CV1/ic_barra_lineas3.png")); line_img.setAbsolutePosition(40, 550); line_img.setAlignment(Image.LEFT | Image.TEXTWRAP); line_img.setBorder(Image.BOX); line_img.setBorderWidth(10); line_img.setBorderColor(BaseColor.WHITE); line_img.scaleToFit(1000, 100); document.add(line_img); }
From source file:utils.pdf.cv_templates.Template3.java
private void addPersonalInformation(User user) throws DocumentException, IOException { Paragraph paragraph;/* w w w . ja v a 2 s. c o m*/ PdfPCell cell; PdfPTable table; Image photo_img; if (!user.photo.id.equals("")) { photo_img = Image .getInstance(String.format("https://s3.amazonaws.com/aunclickdelempleo2/" + user.photo.id)); } else { photo_img = Image.getInstance(String.format("public/images/orientation/photo/ic_profile.png")); } table = new PdfPTable(new float[] { 3, 7 }); table.setWidthPercentage(100); //First column cell = new PdfPCell(); cell.setBorder(PdfPCell.NO_BORDER); cell.setPaddingRight(15); cell.setPaddingLeft(50); cell.setPaddingTop(30); photo_img.setBorder(Image.BOX); photo_img.setBorderColor(BaseColor.WHITE); photo_img.scaleToFit(1000, 115); cell.addElement(photo_img); table.addCell(cell); //Second column cell = new PdfPCell(); cell.setPaddingLeft(55); cell.setPaddingTop(19); cell.setBorder(PdfPCell.NO_BORDER); paragraph = new Paragraph("Datos Personales", font1); paragraph.setAlignment(paragraph.ALIGN_LEFT); cell.addElement(paragraph); paragraph = new Paragraph(user.name + " " + user.surnames, font2); paragraph.setAlignment(paragraph.ALIGN_LEFT); paragraph.setSpacingBefore(8); cell.addElement(paragraph); paragraph = new Paragraph(user.birthDate, font3); paragraph.setAlignment(paragraph.ALIGN_LEFT); cell.addElement(paragraph); paragraph = new Paragraph("Calle " + user.residenceAddress + ", N " + user.residenceNumber + ", Ciudad " + user.residenceCity, font3); paragraph.setAlignment(paragraph.ALIGN_LEFT); cell.addElement(paragraph); paragraph = new Paragraph("Telfono: " + user.phoneNumber, font3); paragraph.setAlignment(paragraph.ALIGN_LEFT); cell.addElement(paragraph); paragraph = new Paragraph(user.email, font3); paragraph.setAlignment(paragraph.ALIGN_LEFT); cell.addElement(paragraph); if (!user.drivingLicense.equals("No tengo carnet")) { paragraph = new Paragraph("Permiso de conducir: " + user.drivingLicense, font3); paragraph.setAlignment(paragraph.ALIGN_LEFT); paragraph.setSpacingBefore(10); cell.addElement(paragraph); } table.addCell(cell); document.add(table); }
From source file:utils.pdf.cv_templates.Template4.java
private void addImage(User user) throws DocumentException, IOException { Image photo_img; if (!user.photo.id.equals("")) { photo_img = Image// w w w . j ava 2s . co m .getInstance(String.format("https://s3.amazonaws.com/aunclickdelempleo2/" + user.photo.id)); } else { photo_img = Image.getInstance(String.format("public/images/orientation/photo/ic_profile.png")); } photo_img.setAbsolutePosition(450, 690); photo_img.setAlignment(Image.LEFT | Image.TEXTWRAP); photo_img.setBorder(Image.BOX); photo_img.setBorderWidth(10); photo_img.setBorderColor(BaseColor.WHITE); photo_img.scaleToFit(1000, 115); document.add(photo_img); }