Hi there,
I have a little problem, and I hope someone could help me out.
I am trying to build a PDF table, with 1 row and 2 columns. But
unfortunately, a cell is failed to show the content correctly - The last
word in the sentence is split in half. I am attaching a screenshot to
show the problem. As you can see, the word 'Annotation' is split into half.
This is my code:
public static void main(String[] args) throws Exception {
Document lDoc = new Document();
FileOutputStream fos = new FileOutputStream(new
File("C:/Sample.pdf"));
PdfWriter.getInstance(lDoc, fos);
lDoc.open();
PdfPTable lTable = new PdfPTable(2);
PdfPCell lCell1 = new PdfPCell();
lTable.addCell(lCell1);
Paragraph lProblemParagraph = new
Paragraph("A point has a position and an annontation.");
PdfPCell lCell2 = new PdfPCell(lProblemParagraph);
lTable.addCell(lCell2);
lDoc.add(lTable);
lDoc.close();
fos.close();
}
After digging into a bit deeper, it seems that the problem is caused by
the character ' i ', which is thinner than the other characters, so
causes a wrong calculation in the text length. Anyway, this is my
guessing only...
Sorry for my bad English. I hope someone could help me with this
problem. Thank you very much!
Have a nice weekend!
Muifull

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/