List of usage examples for com.lowagie.text Phrase Phrase
public Phrase(float leading, String string)
Phrase
with a certain leading and a certain String
. 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); } }