Hi

I am new to the pdf Generation,  i have the Requirement  of  Generating pdf 
with three Columns on a Single Page.

I done the Code  by adding   each content on a 
table(heading,image,paragraph etc), and add all the tables to the array
list, finally adding  the  arraylist to the  ColumnText
using below code i am forming the columns,  

Here i am facing the problem of setting the background of  GrayColor. how to 
set the back ground color  when  setSimpleColumn is using

please suggest on this.

PdfContentByte cb = writer.getDirectContent();
ColumnText ct = new ColumnText(cb);
                        ct.setRunDirection(1);
                        ct.setAlignment(Element.ALIGN_JUSTIFIED);
                        
                        ct.setLeading(0, 1.5f);
                        ct.setSimpleColumn(document.left(), 0, 
document.right(), document
                                        .top());

//adding tables to the ColumnText


int currentColumn = 0;
                        while (true) {
                                int status = ct.go();
                                System.out.println("staus"+status);
                                if (!ct.hasMoreText(status))
                                        break;
                                currentColumn =currentColumn+2;
                                
System.out.println("currentColumn"+currentColumn);
                                if (currentColumn >= allColumns.length)
                                        //break;
                                {
                                        document.newPage();
                                        currentColumn =0;
                                        
                                }
                                
System.out.println("currentColumn>>>>>>>>>>>>>>>>>>>"+currentColumn);
                                 
                                ct.setSimpleColumn(allColumns[currentColumn],
                                                document.bottom(), 
allColumns[currentColumn]
                                                                + 
columnWidth[0], topColumn);
                                

                        }
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/setSimpleColumn-with-ColumnText-tp2326584p2326584.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to