Example usage for com.lowagie.text Phrase Phrase

List of usage examples for com.lowagie.text Phrase Phrase

Introduction

In this page you can find the example usage for com.lowagie.text Phrase Phrase.

Prototype

public Phrase(float leading, String string) 

Source Link

Document

Constructs a Phrase with a certain leading and a certain String.

Usage

From source file:org.cgiar.ccafs.ap.summaries.projects.pdf.ProjectSummaryPDF.java

License:Open Source License

/**
 * Method used for to add the project summary
 *//*from   w w  w  . j  av  a2  s . c o  m*/
private void addSummary() {
    Paragraph paragraph = new Paragraph();
    paragraph.setAlignment(Element.ALIGN_LEFT);
    try {
        Phrase title = new Phrase(this.getText("summaries.project.summary"), BODY_TEXT_BOLD_FONT);
        paragraph.add(title);
        document.add(paragraph);

        paragraph = new Paragraph();
        paragraph.setAlignment(Element.ALIGN_JUSTIFIED);
        Phrase body = new Phrase(this.messageReturn(project.getSummary()), BODY_TEXT_FONT);
        paragraph.add(body);

        document.add(paragraph);

    } catch (DocumentException e) {
        LOG.error("There was an error trying to add the project summary to the project summary pdf", e);
    }
}