how to add column, lines and header in it ?can u show in next tutorial ? charlesakou
how to add column, lines and header in it ?can u show in next tutorial ?
how do I generate a dynamic pdf in packaged application? austineadah
how do I generate a dynamic pdf in packaged application?
The source code is here... enjoy :D import com.itextpdf.text.Document; import import com.itextpdf.text.Paragraph; import import import import java.io.FileOutputStream; import java.sql.*; import java.sql.ResultSet; public class PDFReport { public static void main(String ar[]) throws ClassNotFoundException, SQLException, DocumentException, FileNotFoundException { int rowno=0; Connection Statement st=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet rs=st.executeQuery("select * from visitor"); ResultSetMetaData rsmd=rs.getMetaData(); int colno=rsmd.getColumnCount(); while(rs.next()) { rowno=rowno+1; } rs.first(); //System.out.print(""+rowno); Document d=new Document(); PdfWriter.getInstance(d, new PdfPTable pt=new PdfPTable(colno); d.open(); d.add(new Paragraph("Visitor Report")); for(int i=0;i<rowno;i++) { rs.next(); } d.add(pt); d.close(); } } UnpossiblePOG
The source code is here... enjoy :D import com.itextpdf.text.Document; import import com.itextpdf.text.Paragraph; import import import import java.io.FileOutputStream; import java.sql.*; import java.sql.ResultSet; public class PDFReport { public static void main(String ar[]) throws ClassNotFoundException, SQLException, DocumentException, FileNotFoundException { int rowno=0; Connection Statement st=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet rs=st.executeQuery("select * from visitor"); ResultSetMetaData rsmd=rs.getMetaData(); int colno=rsmd.getColumnCount(); while(rs.next()) { rowno=rowno+1; } rs.first(); //System.out.print(""+rowno); Document d=new Document(); PdfWriter.getInstance(d, new PdfPTable pt=new PdfPTable(colno); d.open(); d.add(new Paragraph("Visitor Report")); for(int i=0;i<rowno;i++) { rs.next(); } d.add(pt); d.close(); } }
but the link pdf reader doesn't work or umpty ! charlesakou
but the link pdf reader doesn't work or umpty !