Example usage for com.lowagie.text Paragraph setLeading

List of usage examples for com.lowagie.text Paragraph setLeading

Introduction

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

Prototype

public void setLeading(float fixedLeading) 

Source Link

Usage

From source file:org.unitime.timetable.util.PdfWorksheet.java

License:Open Source License

protected void printFooter() throws DocumentException {
    out("");/*from   w w  w  .  j  a  v a 2 s.c  o  m*/
    out(renderEnd(renderMiddle("", "Page " + (iPageNo + 1)),
            "<" + iCurrentSubjectArea.getSubjectAreaAbbreviation()
                    + (iCourseNumber != null ? " " + iCourseNumber : "") + ">  "));
    //FIXME: For some reason when a line starts with space, the line is shifted by one space in the resulting PDF (when using iText 5.0.2)
    Paragraph p = new Paragraph(iBuffer.toString().replace("\n ", "\n  "), PdfFont.getFixedFont());
    p.setLeading(9.5f); //was 13.5f
    iDoc.add(p);
    iBuffer = new StringBuffer();
    iPageNo++;
}

From source file:oscar.oscarReport.pageUtil.GenerateEnvelopesAction.java

License:Open Source License

Paragraph getEnvelopeLabel(String text) {
    Paragraph p = new Paragraph(text, FontFactory.getFont(FontFactory.HELVETICA, 18));
    p.setLeading(22);
    return p;
}