Example usage for com.itextpdf.text.pdf PdfTemplate beginText

List of usage examples for com.itextpdf.text.pdf PdfTemplate beginText

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf PdfTemplate beginText.

Prototype

public void beginText() 

Source Link

Document

Starts the writing of text.

Usage

From source file:com.masscustsoft.service.ToPdf.java

License:Open Source License

@Override
public void onCloseDocument(PdfWriter writer, Document document) {
    PdfTemplate tpl = getPgTpl();
    tpl.beginText();
    tpl.setFontAndSize(getDefaultFont(), 12);
    tpl.setTextMatrix(0, 0);/*from   w  w w  . j av  a 2 s .  com*/
    tpl.showText(Integer.toString(writer.getPageNumber() - 1));
    tpl.endText();
}