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:utils.pdf.cv_templates.Template1.java

private void addImageLine5() throws DocumentException, IOException {
    Image line_img;//from   w ww . ja v 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, 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 addLineImage() throws DocumentException, IOException {
    Image short_line_img = Image.getInstance(SHORT_LINE_IMAGE);
    short_line_img.setAbsolutePosition(213, 756);
    short_line_img.setAlignment(Image.MIDDLE | Image.TEXTWRAP);
    short_line_img.setBorderWidth(10);
    short_line_img.setBorderColor(BaseColor.WHITE);
    short_line_img.scaleToFit(300, 55);
    document.add(short_line_img);
}

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

private void addImage(User user) throws DocumentException, IOException {
    Image photo_img;/*from   w  w  w . ja va  2  s.  c o  m*/
    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(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);
}