I am having trouble getting to flow across pages using  itextsharp.

Here is the code:

                Paragraph phrPrivacy = new
Paragraph(myDataReader["text"].ToString(), times9);

                phrPrivacy.Add(new Chunk("Security Dealers of North
America ",times9i));

                myDataReader.Read();

                phrPrivacy.Add(new Chunk(
myDataReader["text"].ToString(),times9));

                phrPrivacy.KeepTogether = true;

//phrPrivacy has the data and prints fine if I don't use ct.Go(True);
except it truncates if near bottom of page

                ct.AddElement(phrPrivacy);

                int iGoStat;

                iGoStat = ct.Go(true);

                if (iGoStat == ColumnText.NO_MORE_TEXT)

                {

                    ct.AddElement(phrPrivacy); 

                    ct.YLine = fPos;

                    ct.Go();        // does not print

                }

                else

                {

                    doc.NewPage();

                    ct.AddElement(phrPrivacy);  

                    ct.YLine = doc.Top - 30;

                    ct.Go();        // Does not print

                }

 

What am I doing wrong? The flow is from the book.

 

Thanks,

Glen
--------------------------------------------------------

The information contained in this message is intended only for the recipient, 
and may be a confidential attorney-client communication or may otherwise be 
privileged and confidential and protected from disclosure. If the reader of 
this message is not the intended recipient, or an employee or agent responsible 
for delivering this message to the intended recipient, please be aware that any 
dissemination or copying of this communication is strictly prohibited. If you 
have received this communication in error, please immediately notify us by 
replying to the message and deleting it from your computer.  The McGraw-Hill 
Companies, Inc. reserves the right, subject to applicable local law, to monitor 
and review the content of any electronic message or information sent to or from 
McGraw-Hill employee e-mail addresses without informing the sender or recipient 
of the message.
--------------------------------------------------------
-------------------------------------------------------------------------
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

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to