rajeshkatkam wrote: > I am converting html of my label to PDF. In the first screen i had shown the > page with label and how it looks in the browser.
OK. > I am setting the dimensions for the columntext, But you're setting the dimension in an awkward location in your code. > because i have to get the > PDF with exact dimensions of the label(height and width) ie, if label is 4in > x 4in then pdf should be match with label in dimensions. Again you're not clear. You say PDF should be match with label in dimensions. That sounds like you say: the size of the document should match with the label. That's not what you mean, or is it? It's hard to know because of the way you phrase it. > In string variable 'box_content' i am taking the html of the label. After > converting this html to paragraph i am adding it to the columntext. I very much doubt that the String "tiny_mce/plugins/emotions/img/smiley-cool.jpg" matches such a tiny rectangle. > Can u test with this type of application. No need to test. What you need is almost exactly one of the exercises that are given when people follow an iText training: http://1t3xt.info/examples/browse/?page=example&id=347 The method addText(String s, PdfContentByte canvas, float[] f, float size, boolean simulate) converts the HTML String "s" to iText objects. It tries to add these objects to "canvas" using font size "size" fitting the content in a rectangle defined with coordinates "f". If the content doesn't fit, then the font size is decreased, until it fits. You should study that example. (And maybe ask your boss to follow an iText training.) -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/
