Example usage for com.itextpdf.text Image getInstance

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

Introduction

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

Prototype

public static Image getInstance(final Image image) 

Source Link

Document

gets an instance of an Image

Usage

From source file:report.pdfs.Lighting_PDF_Report.java

private void addPieChart(Section catPart) {
    Lighting_Pie_Chart_Report chart = new Lighting_Pie_Chart_Report(show, "Comparison",
            "Lighting Expenses Overview");
    Image To_be_Added = null;/*from  www  . 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:report.pdfs.Machinery_PDF_Report.java

private void addBarChart(Section catPart) {
    Machinery_Bar_Chart_Report chart = new Machinery_Bar_Chart_Report(show, "Machinery Expenses Overview");
    Image To_be_Added = null;//from   w w  w . java 2s .  c  o m
    try {
        To_be_Added = Image.getInstance("bar_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:report.pdfs.Machinery_PDF_Report.java

private void addPieChart(Section catPart) {
    Machinery_Pie_Chart_Report chart = new Machinery_Pie_Chart_Report(show, "Comparison",
            "Machinery Expenses Overview");
    Image To_be_Added = null;//  w  w  w. ja  va2s .c  om
    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:report.pdfs.Medical_PDF_Report.java

private void addBarChart(Section catPart) {
    Medical_Bar_Chart_Report chart = new Medical_Bar_Chart_Report(show, "Medical Expenses Overview");
    Image To_be_Added = null;/*  w ww  . j av  a  2s .  c  o  m*/
    try {
        To_be_Added = Image.getInstance("bar_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:report.pdfs.Medical_PDF_Report.java

private void addPieChart(Section catPart) {
    Medical_Pie_Chart_Report chart = new Medical_Pie_Chart_Report(show, "Comparison",
            "Medical Expenses Overview");
    Image To_be_Added = null;//from  w w w.  ja v  a2  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:report.pdfs.Mortgaged_PDF_Report.java

private void addBarChart(Section catPart) {
    Mortgaged_Bar_Chart_Report chart = new Mortgaged_Bar_Chart_Report(show, "Mortgaged Expenses Overview");
    Image To_be_Added = null;/*from   w w  w .j a v a2s  .  c o  m*/
    try {
        To_be_Added = Image.getInstance("bar_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:report.pdfs.Mortgaged_PDF_Report.java

private void addPieChart(Section catPart) {
    Mortgaged_Pie_Chart_Report chart = new Mortgaged_Pie_Chart_Report(show, "Comparison",
            "Mortgaged Expenses Overview");
    Image To_be_Added = null;/*ww 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:report.pdfs.Rented_PDF_Report.java

private void addBarChart(Section catPart) {
    Rented_Bar_Chart_Report chart = new Rented_Bar_Chart_Report(show, "Rented Expenses Overview");
    Image To_be_Added = null;//ww  w.java  2 s .  c o  m
    try {
        To_be_Added = Image.getInstance("bar_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:report.pdfs.Rented_PDF_Report.java

private void addPieChart(Section catPart) {
    Rented_Pie_Chart_Report chart = new Rented_Pie_Chart_Report(show, "Comparison", "Rented Expenses Overview");
    Image To_be_Added = null;/*from ww  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:report.pdfs.Slurry_PDF_Report.java

private void addBarChart(Section catPart) {
    Slurry_Bar_Chart_Report chart = new Slurry_Bar_Chart_Report(show, "Slurry Expenses Overview");
    Image To_be_Added = null;//from  w ww . j  a v  a2  s .c  o m
    try {
        To_be_Added = Image.getInstance("bar_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);
}