danielitob wrote: > Hello guys, > I'm newbie of Itext library and I'm learning to use it in my applications. > I need your help for my issue, about printing a frame to pdf. > I'll try to explain. I've a frame in my swing application that can change > dimensions basing on content. I need a submit button that, once clicked, > print to pdf frame and its content. > Actually I'm not able to do it, because I act in this way: > 1) I create a pdf page (but I need in this step to set dimension of page) > 2) I'm able to print frame into page, but page has fixed dimensions. So if > frame: > -is smaller than page, I see white space > -is bigger than page not the whole frame is printed. > > I need to "adapt" page to frame dynamic dimension,
So what you're saying is: you want to define the dimensions of the page? That's done in the Document constructor. Document document = new Document(new Rectangle(width, height)); Width and height are expressed in user units. By default a user unit is 1/72 of an inch. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ 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/
