Okay so here's my problem.

I have a ColumnText object that I'm adding text to. I'm using the simulate
function to check if the text fits if it does I add it, If not I scale it
down and try adding it again.

//AddTextColumn is my helper function that abstracts the logic where iText
is used to place the text.

for (float xfontSize = currLabelSetting.FontSize.Value; xfontSize >=
currLabelSetting.FontSizeMin.Value; xfontSize -= .25f)
{
var seriesPhrase = new Phrase(new Chunk("Test Test Test Test Test", new
Font(GetBaseFont(currLabelSetting.Font.Value), xfontSize)));
if (!AddTextColumn(writer, seriesPhrase, Element.ALIGN_LEFT, xfontSize, 0f,
currLabelSetting.TechDataPrimaryLeft,
currLabelSetting.TechDataPrimaryRight))
                            break;
}

The dimensions of the box are always: left limit (513,237,513,177) right
limit (824,237,824,177)

My Leading is set to the xfontSize I try to add. The multiplied leading is
set to 0f.

The outcome is for 60pt font it places perfectly inside the box on one line.

If I try to add a longer string of text it places it on two lines this is
what I want however the text is moved up.

I'm thinking this has to do with leading but why would leading be applied
to the top line?

Please see screen shots here:
60PT Font Single Line -
https://dl.dropbox.com/u/249320/Snaggen/Tnemec/itextIssues/60PTExample.PNG
26PT Font Two Lines -
https://dl.dropbox.com/u/249320/Snaggen/Tnemec/itextIssues/26PTExample.PNG

Thanks in advance.
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to