itext-questions  

Re: [iText-questions] Some startup problems

Ivar Kunst
Tue, 22 Jul 2008 08:41:36 -0700

Thanks for your quick reply the other day! I moved on and the document starts
to look smoother everyday.

Still i have a few questions.

What im using at the moment, is the irregular column, which i can wrap
around the images on my page. Sometimes the text i add to the page, can
exceed the bottom of the page, and the text is lost.... or not. I know it
get stored then and you can show it in the next column, but i don't have a
extra column on that current page. So the question is...

How can I:
-Save the text that didn't fit the page
-Create a new Page
-Create the header and footer(got a function for that)
-show the text that didn't fit the previous page.


1 other thing i came across which i got some question about.
Do i have to set the irregular column sizes before i start to add text and
pitures? Because i want to put text in a database and the images do not
always need to show. So the size of the column can change. Maybe its a bit
unclear but the thing i like to know, how can i let's say, add text(which
wont be the same all the time, so can differ in length) then add a picture
at the end of the text(this part is easy, use the Yline) but now i have to
define where the irregular column goes, and because the place of the picture
aint always the same, i found that that was the harder part.

Long story, sorry, but i hope my question is clear:)

Thanks for your time,
Ivar







1T3XT info wrote:
> 
> 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
> iText-questions@lists.sourceforge.net
> 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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Some-startup-problems-tp18524767p18589732.html
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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
iText-questions@lists.sourceforge.net
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