Ivar Kunst wrote: > Hey all, > > Im new to iTextSharp. Im really enjoying it, but i came across some > problems. I've googled my problems but couldnt really find the answers, > i've also gone through the tutorial. I might have missed the answers, im > sorry then :)
I think you missed the part about ColumnText. Let me explain further on: > I want to create a nice document, i managed to create the first page. > Now the second page will have a combination of a header and footer, which > i created as well, not through the header and footer usage, but just with > a DirectContent. But that looks quite good. Indeed: you're on the right track! That's exactly how you should do it. > Now i want to add a > combinatie of text and pictures. But the problem is, i couldnt find a > way to set the absolute position of, let's say a paragraph. so i can't > get the pictures and text lined out properly. From your description, I understand that you need a high level of control over the layout. In that case, working with just document.add(element); isn't sufficient as you have found out yourself ;-) > I also tried the cb.showtext() functions, but if there is more text that > fits the page, it doesnt go to a new line, it just go off the page. Yes, showText (and showTextAligned) in PdfContentByte are used for other purposes. (Low level control over the PDF syntax.) > I > don't know if you need to set a certain property, so it automaticly go > to a new line? ColumnText is THE object that combines the high level building blocks (like Phrase, Paragraph, PdfPTable,...) with the power of PdfContentByte. http://itextdocs.lowagie.com/tutorial/objects/columns/index.php Basically you create a ColumnText object using the direct content of a writer. Then you fill the column with high level objects and define a Rectangle on the page. And when you go() the content is added to the page. (There's more to it, but that's explained in chapter 7 of the book.) -- This answer is provided by 1T3XT BVBA ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
