pdf alignment

UI Components for JSF
Post Reply
ramesh.s
Posts: 2
Joined: 10 Mar 2011, 09:02

10 Mar 2011, 09:14

Hi all,

I am new to primefaces and i am working on the data exporter of pdf.This pdf exporting data from the datatable but the alignment is looking ugly. And i am having 9 columns so pls guide me ,how to make it align through action class. And my code is here.

public void preProcessPDF(Object document) throws IOException, BadElementException, DocumentException {
Document pdf = (Document) document;
pdf.open();
pdf.setPageSize(PageSize.A4);
// report title
Paragraph p = new Paragraph("EntryOrExit Report");
p.setAlignment(1);
Font font = new Font();
font.setSize(20);
font.setFamily("Verdana, Arial, Helvetica, sans-serif");
p.setFont(font);
p.setSpacingAfter(40);
pdf.add(p);
}




can any one pls reply me.................

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 62 guests