Title: Message
I have a header in a RTF file that has several lines.  The couple first lines is supposed to be aligned centered but the last 3 lines are supposed to be left justified.  Does anyone know how to do this please?
Here is the code:
 
        Phrase l_phrase = new Phrase(12, c_headerString, c_timesBold12);  //c_headerString is the first two lines to be centered
       c_data = new Phrase(12, "The 1st Left justified line", c_couriorBold);
       c_data.add(new Phrase(12, "The 2nd Left justified line", c_couriorBold);
       c_data.add(new Phrase(12, "The 3rd Left justified line", c_couriorBold);
       l_phrase.add(c_data);  //c_data has to be left justified
       
       HeaderFooter l_hf = new HeaderFooter(l_phrase, false);
       l_hf.setAlignment(l_hf.ALIGN_CENTER);    //this causes the alignment to be centered for all
       l_hf.setBorder(Rectangle.NO_BORDER);
       c_document.setHeader(l_hf);
 
Any help is greatly appreciated,
Flora

       

Reply via email to