You might be able to do this with some custom cell rendering (which I
believe is possible).  You can check the dimensions of the cell vs the
page (is there room for another row?), and draw your borders yourself.
 
Kind of a pain, but I think it would work.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
 
 


________________________________

        From: Nurettin DAG [mailto:[email protected]] 
        Sent: Wednesday, October 13, 2010 11:32 AM
        To: Post all your questions about iText here
        Subject: Re: [iText-questions] Choice of "method"
        
        
        That is a way around it. I would personally like to see
PdfPTable event notifying of table split event for cleaner and easier to
understand code.
        
        
        On Wed, Oct 13, 2010 at 1:43 PM, Mark Storer
<[email protected]> wrote:
        

                With PdfContentByte you might be able to draw a white
(or Other Background Color) dashed line over the bottom line of the
'broken' table to get the effect you want after the table has been
rendered.
                 
                --Mark Storer
                  Senior Software Engineer
                  Cardiff.com
                 
                import legalese.Disclaimer;
                Disclaimer<Cardiff> DisCard = null;
                 
                 


________________________________

                        
                        From: Nurettin DAG
[mailto:[email protected]] 
                        
                        Sent: Wednesday, October 13, 2010 10:35 AM 

                        To: Post all your questions about iText here
                        Subject: Re: [iText-questions] Choice of
"method"
                        

                        Mark, it sounds like a good idea. I don t really
remember why I have not combined PdfPTableEvent and PdfPageEvent to
yield the same effect. I might have run into some issues or I might have
never thought about it. It has been a while now. I do not see any reason
why it would not work, worthwhile to try and see. I will try it myself
to see if that would work when I get a chance.
                        
                        After I wrote the lines above and I kept
thinking about it. Combing the two would probably work for the
continuation text requirement. However, my requirement also included to
draw borders around the table and if table was split I was supposed to
draw dashed border at the bottom. In short, I needed to take actions
both on split and no split cases which required me to know about a
possible split before the table event. (endOfPage will occur after
onTableEvent). That is why I think either onTableEvent or another event
that will trigger before onTableEvent needs to be added to notify of an
upcoming table split.
                        
                        Thanks Mark
                        
                        
                        On Wed, Oct 13, 2010 at 12:39 PM, Mark Storer
<[email protected]> wrote:
                        

                                IIRC, there's already an "end of page"
event.  Did that not work for you?
                                 
                                --Mark Storer
                                  Senior Software Engineer
                                  Cardiff.com
                                 
                                import legalese.Disclaimer;
                                Disclaimer<Cardiff> DisCard = null;
                                 
                                 


________________________________

                                From: Nurettin DAG
[mailto:[email protected]] 
                                Sent: Wednesday, October 13, 2010 9:34
AM
                                To: Post all your questions about iText
here
                                Subject: Re: [iText-questions] Choice of
"method"
                                
                                
                                I had a similar requirement and
PdfPTable worked just fine for me except for the fact that I was not
able to detect tables breaking across pages thus unable to write
warnings like Ctnd on next page and ctnd from prev page in the new page.
                                
                                To resolve the issue I locally patched
PdfPTable to notify listeners of the table split event which helped me
display split warnings in the page. I was thinking of submitting the
patch to sourceforge. However, it may not be acceptable because it will
break backward compatibility. Do you guys also think that it is
important to know about table split event?
                                
                                Thanks
                                Nurettin
                                
                                
                                On Wed, Oct 13, 2010 at 12:20 PM, Mark
Storer <[email protected]> wrote:
                                

                                So long as you're not directly
manipulating the PdfContentByte, page
                                breaking & layout flow is handled for
you by ColumnText, PdfPTable,
                                Paragraph, Document, Etc etc etc.
                                
                                --Mark Storer
                                 Senior Software Engineer
                                 Cardiff.com
                                
                                import legalese.Disclaimer;
                                Disclaimer<Cardiff> DisCard = null;
                                



                                > -----Original Message-----
                                > From: riffla
[mailto:[email protected]]
                                > Sent: Wednesday, October 13, 2010 2:38
AM
                                > To:
[email protected]
                                > Subject: [iText-questions] Choice of
"method"
                                >
                                >
                                > Hi
                                >
                                > Having ordered the book "iText in
Action" but not reveived it
                                > yet - I now need some advice here.
                                > I wonder which way I should go if I
have the following
                                > consdiderations to
                                > make:
                                >
                                > - The PDF will be generated
dynamically built upon data
                                > collected in several web forms
(nothing strange about this)
                                > - But there are several parts where I
don't know the length
                                > of ahead. For example the users is
submitting multiple
                                > instances of certain strings - which
could be implemented
                                > using PdfPTable - but how about page
breaks here, will a
                                > PdfPTable automatically continue on
the next page (and I
                                > might need a table header on each
subsequent page informing
                                > that this table/list belongs to
table/list from previous page)
                                > - And depending on other selections
the user has made, some
                                > text blocks may vary in size. Is
ColumnText a bad choice here
                                >
                                > Summarizing the nature of the PDF that
is to be genereated is
                                > that I need automatic page break
detection, and some
                                > automatic flow since I don't know the
size of lists and
                                > length of texts ahead. And,
additionally, we need to have a
                                > template to be loaded containing a
first page header (logo, address
                                > etc) and a document-id vertical
oriented in the left page
                                > margin, where the last 4 digits is
corresponding to the total
                                > number of pages (dynamic) in the
generated doc and the
                                > current page's sequential position
within the PDF.
                                >
                                > Any advice?
                                >
                                > /R
                                > --
                                > View this message in context:
                                >
http://itext-general.2136553.n4.nabble.com/Choice-of-method-tp
                                2993417p2993417.html
<http://itext-general.2136553.n4.nabble.com/Choice-of-method-tp%0A299341
7p2993417.html> 
                                > Sent from the iText - General mailing
list archive at Nabble.com.
                                >
                                >
--------------------------------------------------------------
                                > ----------------
                                > Beautiful is writing same markup.
Internet Explorer 9
                                > supports standards for HTML5, CSS3,
SVG 1.1,  ECMAScript5,
                                > and DOM L2 & L3.
                                > Spend less time writing and  rewriting
code and more time
                                > creating great experiences on the web.
Be a part of the beta today.
                                > http://p.sf.net/sfu/beautyoftheweb
                                >
_______________________________________________
                                > iText-questions mailing list
                                > [email protected]
                                >
https://lists.sourceforge.net/lists/listinfo/itext-questions
                                >
                                > Many questions posted to this list can
(and will) be answered
                                > with a reference to the iText book:
                                > http://www.itextpdf.com/book/ Please
check the keywords list
                                > before you ask for examples:
http://itextpdf.com/themes/keywords.php
                                >
                                >
                                
                                > No virus found in this incoming
message.
                                > Checked by AVG - www.avg.com
                                > Version: 9.0.862 / Virus Database:
271.1.1/3192 - Release
                                > Date: 10/12/10 11:37:00
                                
                                >
                                
        
------------------------------------------------------------------------
------
                                Beautiful is writing same markup.
Internet Explorer 9 supports
                                standards for HTML5, CSS3, SVG 1.1,
ECMAScript5, and DOM L2 & L3.
                                Spend less time writing and  rewriting
code and more time creating great
                                experiences on the web. Be a part of the
beta today.
                                http://p.sf.net/sfu/beautyoftheweb
        
_______________________________________________
                                iText-questions mailing list
                                [email protected]
        
https://lists.sourceforge.net/lists/listinfo/itext-questions
                                
                                Many questions posted to this list can
(and will) be answered with a reference to the iText book:
http://www.itextpdf.com/book/
                                Please check the keywords list before
you ask for examples: http://itextpdf.com/themes/keywords.php
                                




                                -- 
                                Nurettin DAG
                                

                                
                                No virus found in this incoming message.
                                Checked by AVG - www.avg.com
                                
                                Version: 9.0.862 / Virus Database:
271.1.1/3192 - Release Date: 10/12/10 23:34:00
                                

                                

                                

                                


        
------------------------------------------------------------------------
------
                                Beautiful is writing same markup.
Internet Explorer 9 supports
                                standards for HTML5, CSS3, SVG 1.1,
ECMAScript5, and DOM L2 & L3.
                                Spend less time writing and  rewriting
code and more time creating great
                                experiences on the web. Be a part of the
beta today.
                                http://p.sf.net/sfu/beautyoftheweb
        
_______________________________________________
                                iText-questions mailing list
                                [email protected]
        
https://lists.sourceforge.net/lists/listinfo/itext-questions
                                
                                Many questions posted to this list can
(and will) be answered with a reference to the iText book:
http://www.itextpdf.com/book/
                                Please check the keywords list before
you ask for examples: http://itextpdf.com/themes/keywords.php
                                




                        -- 
                        Nurettin DAG
                        

                        No virus found in this incoming message.
                        Checked by AVG - www.avg.com
                        Version: 9.0.862 / Virus Database: 271.1.1/3192
- Release Date: 10/12/10 23:34:00
                        

                        


        
------------------------------------------------------------------------
------
                Beautiful is writing same markup. Internet Explorer 9
supports
                standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and
DOM L2 & L3.
                Spend less time writing and  rewriting code and more
time creating great
                experiences on the web. Be a part of the beta today.
                http://p.sf.net/sfu/beautyoftheweb
                _______________________________________________
                iText-questions mailing list
                [email protected]
        
https://lists.sourceforge.net/lists/listinfo/itext-questions
                
                Many questions posted to this list can (and will) be
answered with a reference to the iText book:
http://www.itextpdf.com/book/
                Please check the keywords list before you ask for
examples: http://itextpdf.com/themes/keywords.php
                




        -- 
        Nurettin DAG
        

        No virus found in this incoming message.
        Checked by AVG - www.avg.com
        Version: 9.0.862 / Virus Database: 271.1.1/3192 - Release Date:
10/12/10 23:34:00
        

        

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to