Example usage for com.itextpdf.text.pdf PdfPTable setWidthPercentage

List of usage examples for com.itextpdf.text.pdf PdfPTable setWidthPercentage

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf PdfPTable setWidthPercentage.

Prototype

public void setWidthPercentage(final float columnWidth[], final Rectangle pageSize) throws DocumentException 

Source Link

Document

Sets the percentage width of the table from the absolute column width.

Usage

From source file:jdbreport.model.io.pdf.itext5.PdfWriter.java

License:Apache License

private PdfPTable createPdfTable(int columnCount, float[] widths, Rectangle pageSize) throws DocumentException {
    PdfPTable table;
    table = new PdfPTable(columnCount);
    table.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
    table.setTotalWidth(widths);/*from  w w  w .j a  v  a2s .c  o m*/
    table.setWidthPercentage(widths, pageSize);
    return table;
}