Example usage for com.itextpdf.text Image TEXTWRAP

List of usage examples for com.itextpdf.text Image TEXTWRAP

Introduction

In this page you can find the example usage for com.itextpdf.text Image TEXTWRAP.

Prototype

int TEXTWRAP

To view the source code for com.itextpdf.text Image TEXTWRAP.

Click Source Link

Document

this is a kind of image alignment.

Usage

From source file:report.pdfs.Water_PDF_Report.java

private void addPieChart(Section catPart) {
    Water_Pie_Chart_Report chart = new Water_Pie_Chart_Report(show, "Comparison", "Water Expenses Overview");
    Image To_be_Added = null;/*from w w  w. j a  va 2 s.  co  m*/
    try {
        To_be_Added = Image.getInstance("pie_chart.png");
    } catch (BadElementException e) {
        e.printStackTrace();
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }

    To_be_Added.setAlignment(Image.MIDDLE | Image.TEXTWRAP);
    //To_be_Added.setBorder(Image.BOX);
    //To_be_Added.setBorderWidth(15);

    catPart.add(To_be_Added);
}

From source file:utils.pdf.cv_templates.Template1.java

private void addImage(User user) throws DocumentException, IOException {
    Image photo_img;//from  ww w. java 2 s .c om
    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"));
    }

    photo_img.setAbsolutePosition(40, 670);
    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, 130);
    document.add(photo_img);
}

From source file:utils.pdf.cv_templates.Template1.java

private void addImageTelephone() throws DocumentException, IOException {
    Image phone_img;//w w w  .java 2  s . co  m
    phone_img = Image.getInstance(String.format("public/images/orientation/cv-templates/CV1/ic_mobile.png"));
    phone_img.setAbsolutePosition(175, 708);
    phone_img.setAlignment(Image.LEFT | Image.TEXTWRAP);
    phone_img.setBorder(Image.BOX);
    phone_img.setBorderWidth(10);
    phone_img.setBorderColor(BaseColor.WHITE);
    phone_img.scaleToFit(1000, 18);
    document.add(phone_img);
}

From source file:utils.pdf.cv_templates.Template1.java

private void addImageEmail() throws DocumentException, IOException {
    Image email_img;/*from   w  w  w.  j a v  a 2 s.c o m*/
    email_img = Image.getInstance(String.format("public/images/orientation/cv-templates/CV1/ic_mail.png"));
    email_img.setAbsolutePosition(173, 690);
    email_img.setAlignment(Image.LEFT | Image.TEXTWRAP);
    email_img.setBorder(Image.BOX);
    email_img.setBorderWidth(10);
    email_img.setBorderColor(BaseColor.WHITE);
    email_img.scaleToFit(1000, 11);
    document.add(email_img);
}

From source file:utils.pdf.cv_templates.Template1.java

private void addImageAddress() throws DocumentException, IOException {
    Image address_img;/*from w ww .  j a v a 2  s  . c  om*/
    address_img = Image
            .getInstance(String.format("public/images/orientation/cv-templates/CV1/ic_location.png"));
    address_img.setAbsolutePosition(173, 730);
    address_img.setAlignment(Image.LEFT | Image.TEXTWRAP);
    address_img.setBorder(Image.BOX);
    address_img.setBorderWidth(10);
    address_img.setBorderColor(BaseColor.WHITE);
    address_img.scaleToFit(1000, 18);
    document.add(address_img);
}

From source file:utils.pdf.cv_templates.Template1.java

private void addImageLine() throws DocumentException, IOException {
    Image line_img;/* w  w  w.j  a va 2  s  .c om*/
    line_img = Image
            .getInstance(String.format("public/images/orientation/cv-templates/CV1/ic_barra_lineas3.png"));
    line_img.setAbsolutePosition(40, 50);
    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 addImageLine1() throws DocumentException, IOException {
    Image line_img;//from w w w.  j  ava  2  s . co m
    line_img = Image
            .getInstance(String.format("public/images/orientation/cv-templates/CV1/ic_barra_lineas3.png"));
    line_img.setAbsolutePosition(40, 150);
    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 addImageLine2() throws DocumentException, IOException {
    Image line_img;//from   ww w  .j  ava 2  s. c om
    line_img = Image
            .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;/*from   ww w . j  a  v  a2  s  .  co  m*/
    line_img = Image
            .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;/*w w  w.jav a  2 s  . c  o m*/
    line_img = Image
            .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);
}