Example usage for com.itextpdf.text Rectangle getLeft

List of usage examples for com.itextpdf.text Rectangle getLeft

Introduction

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

Prototype

public float getLeft(final float margin) 

Source Link

Document

Returns the lower left x-coordinate, considering a given margin.

Usage

From source file:gov.nih.nci.firebird.service.pdf.AdditionalContent.java

License:Open Source License

private void addText(PdfReader reader, PdfStamper stamper, ColumnText text) throws DocumentException {
    Rectangle pageSize = reader.getPageSize(1);
    int newPageNumber = reader.getNumberOfPages() + 1;
    do {/*  ww  w . j av  a  2 s .c o m*/
        stamper.insertPage(newPageNumber, pageSize);
        PdfContentByte newContent = stamper.getOverContent(newPageNumber);
        text.setCanvas(newContent);
        text.setSimpleColumn(pageSize.getLeft(MARGIN_SIZE), pageSize.getTop(MARGIN_SIZE),
                pageSize.getRight(MARGIN_SIZE), pageSize.getBottom(MARGIN_SIZE));
        newPageNumber++;
    } while (ColumnText.hasMoreText(text.go()));
}