Ashish Dasnurkar wrote: > Hi all, > I am attempting to write Excel to Pdf conversion utility and find myself > stuck at determining width/height sizes for PdfPTable/PdfPCell. > Excel column width is specified in "Char Unit" defined as 1/256 of size > of a character i.e. 1 char unit = 1/256 of width of a character (width > of character is determined by excel) > and excel row height is specified in "twips" which is defined as 1/20 of > a point. On the other hand iText deals with "User space units" which is > defined as 1/72 of an inch. > > So for example if Excel column width is 7058 char units which roughly > equals to 27 characters (or if I use Calibri 11pt font that has > approximately 7 pixel width it is 190 pixels) how do I calculate > equivalent number of user space units? Does anyone here has experience > dealing these conversions? Any help/pointers are highly appreciated.
Good question. PDF also has a measurement system for characters. You should check ISO 32000 (can be downloaded for free from adobe.com). Search the document for "glyph space" and you'll find the definition. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
