Example usage for com.itextpdf.text Image getScaledHeight

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

Introduction

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

Prototype

public float getScaledHeight() 

Source Link

Document

Gets the scaled height of the image.

Usage

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

private void addBackgroundImage() throws DocumentException, IOException {
    Image back_img = Image.getInstance(BACK_IMAGE);
    back_img.setAbsolutePosition((PageSize.A4.getWidth() - back_img.getScaledWidth()) / 2,
            (PageSize.A4.getHeight() - back_img.getScaledHeight()) / 2);
    document.add(back_img);/*www .  j a  va  2  s .c o  m*/
}