The text coordinate y in PDF is the font baseline, not the font top. Maybe that's the problem.
Paulo -----Original Message----- From: karthik B [mailto:karthik87_...@yahoo.co.in] Sent: Thursday, May 19, 2011 4:10 PM To: Post all your questions about iText here Subject: Re: [iText-questions] Place text in speacified x y coordinate Hi, I tried with the rectangle. It is perfectly matching with the inedisgn coordinates and my calculation to render. But my problem when i put the text pdfContentByte.BeginText() pdfContentByte.SetFontAndSize(bf, 18) pdfContentByte.SetTextMatrix(72, 144) pdfContentByte.ShowText("Sample") pdfContentByte.Stroke() pdfContentByte.EndText() I get a difference in the coordinate and it varies when i change the font sizes. Is there any way i could perfectly fix at one position. Thanks & Regards Karthik B --- On Thu, 19/5/11, 1T3XT BVBA <i...@1t3xt.info> wrote: > From: 1T3XT BVBA <i...@1t3xt.info> > Subject: Re: [iText-questions] Place text in speacified x y coordinate > To: itext-questions@lists.sourceforge.net > Date: Thursday, 19 May, 2011, 4:23 PM > Op 19/05/2011 12:44, karthik B > schreef: > > Here the problem is indesign get the x y cordinate > from the center. > > Tsssk! > And how is the baseline of the text defined? > From the top of the bottom. > > > And i am not drawing a rectangle. > So you refuse to take my advise? I was ASKING YOU to draw a > rectangle so > that you could see where the text is supposed to go. Maybe > your > interpretation of the coordinates is wrong (maybe you > should add or > subtract 85.039 to or from the Y coordinate). > I'm not saying your final result should have a rectangle, > but by drawing > a rectangle to TEST your code, you would probably find the > answer that > solves the problem. By saying "I AM NOT DRAWING A > RECTANGLE", you are > saying "I DON'T WANT TO DEBUG MY CODE". And if you're not > willing to > debug your code, why should we? > > ------------------------------------------------------------------------------ > What Every C/C++ and Fortran developer Should Know! > Read this article and learn how Intel has extended the > reach of its > next-generation tools to help Windows* and Linux* C/C++ and > Fortran > developers boost performance applications - including > clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > 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 > ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ 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 Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ 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