You are setting the leading in ct.setSimpleColumn() to 0. Change it to 8 and
it will work.

Best Regards,
Paulo Soares

----- Original Message -----
From: "Norton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 20:19
Subject: [iText-questions] Phrase second line overlapping first


> Hi,
>
> I'm trying to put text in a certain place on a page by
> using ColumnText.setSimpleColumn().  All the text is
> going where I want it to.  The problem, though, is if
> the text in the Phrase I pass to setSimpleColunn() is
> more than one line long, the second line is
> overlapping the first.
>
> You can see an example of my output at
> http://tempest.jumptech.com/labels.pdf
>
> Here's a code snippet of the page creation:
>
>
>      PdfWriter pdfWriter = PdfWriter.getInstance(doc,
> out);
>
>      doc.open();
>
>      PdfContentByte cb = pdfWriter.getDirectContent();
>      ColumnText ct = new ColumnText(cb);
>
>
>      loop rows {
>        loop cols {
>
>          Phrase titlePhrase = new Phrase(name + "\n",
>            new Font(Font.HELVETICA, 8, FOnt.BOLD));
>
>          ct.setSimpleColumn(titlePhrase,
>                  (float)lowerLeft.getX(),
>                  (float)lowerLeft.getY(),
>                  (float)(lowerLeft.getX() +
> labelSize.getWidth()),
>                  (float)(lowerLeft.getY() -
> labelSize.getHeight()),
>                  (float)0, Element.ALIGN_LEFT);
>
>          ct.go();
>
>          recalculateLoweLeft;
>        }
>      }
>
>
> Any idea why this might be happening?
>
> Thanx in advance.
>
> Norton
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: Dice - The leading online job board
> for high-tech professionals. Search and apply for tech jobs today!
> http://seeker.dice.com/seeker.epl?rel_code=31
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to