There is no default header/footer. If the section doesn't specify it then there 
isn't one.

Darren Hoffman
Software Engineer
Qoppa Software 
+1 (404) 685-8733
www.qoppa.com 

-----Original Message-----
From: Eliot Kimber [mailto:[email protected]] 
Sent: Tuesday, June 25, 2019 10:23 AM
To: POI Users List
Subject: Re: Any Active Work on XWPF Sections?

Yeah, I'm still not sure how a section object would work because of the way 
that they get translated to Word objects under the covers.

What I have working at the moment is correct generation of section breaks and 
page number controls but I haven't worked out how to set up the headers and 
footers--I think it should be a matter of adding the header or footer 
definition to the document and then adding references to them on the CTSectPr 
for the section, but I haven't tried it yet.

I think the correct behavior is to have sections use the default header and 
footer if the section doesn't specify it's own (that's certainly what I would 
expect), but I don't know if that's how Word actually works.

Cheers,

E.

--
Eliot Kimber
http://contrext.com
 

On 6/24/19, 3:16 PM, "Mark Murphy" <[email protected]> wrote:

    I don't think there is anyone working on sections. But, I would want a
    section class that is used by the document class much like headers and
    footers. The document object would need to be able to create, retrieve,
    move, and remove sections. In addition, it might be nice to be able to mark
    a particular section as the default section. That's really not the way that
    Word does it, so that functionality would have to be thought about as far
    as how it would work. In Word, the last section is the default section. And
    other than the default section, section information is kept in the last
    paragraph in the section. That paragraph can be otherwise empty.
    
    On Sat, Jun 22, 2019 at 2:31 PM Eliot Kimber <[email protected]> wrote:
    
    > I need to implement generation of sections in DOCX. Looking at the code in
    > trunk I see some code that reads or makes CTSectPr objects (e.g.,
    > XWPFDocument#createFooter) but it doesn't look like full section support 
is
    > there.
    >
    > I would expect an XWPFSection or XWPFSectPR class for working with
    > sections, and maybe methods on XWPFDocument for creating or setting them,
    > although I haven't worked out my exact API needs yet.
    >
    > Is anyone actively working on more complete section support or is there
    > any design work I could use to take this forward?
    >
    > I'll implement some ad-hoc section creation stuff in my Wordinator code
    > but I'd like to fold anything I come up with back into the XWPF API.
    >
    > Cheers,
    >
    > E.
    > --
    > Eliot Kimber
    > http://contrext.com
    >
    >
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: [email protected]
    > For additional commands, e-mail: [email protected]
    >
    >
    



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to