Example usage for com.itextpdf.text Phrase Phrase

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

Introduction

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

Prototype

public Phrase(final float leading, final String string, final Font font) 

Source Link

Document

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

Usage

From source file:book.pdftemplates.FillTemplateHelper.java

@Override
public void onCloseDocument(PdfWriter writer, Document document) {
    // we only know the total number of pages at the moment the document is closed.
    String s = "/" + (writer.getPageNumber() - 1);
    Phrase p = new Phrase(12, s, font);
    ColumnText.showTextAligned(total, Element.ALIGN_LEFT, p, 0.5f, 0, 0);
}