2 questions:
Q1: My Jtable is fairly big, meaning spans multiple pages. But I can see
only the first page in generated PDF.
Q2: Can any one suggest a way to generate table header?

For your referenceL: I am using following code 

                Rectangle pageSize = new Rectangle(1100, 1400);
                Document document = new Document(pageSize);
            try {
              PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream("jTable.pdf"));
              document.open();
              PdfContentByte cb = writer.getDirectContent();

              cb.saveState();
              Graphics2D g2 = cb.createGraphicsShapes(1100, 1400);

              Shape oldClip = g2.getClip();
              g2.clipRect(0, 0, 1100, 1400);

              jTable2.print(g2);
              g2.setClip(oldClip);

              g2.dispose();
              cb.restoreState();
            } catch (Exception e) {
              System.err.println(e.getMessage());
            }
            document.close();

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to