link_to_previous method

Links or unlinks all headers and footers to the corresponding headers and footers in the previous section.

def link_to_previous(self, is_link_to_previous):
    ...
Parameter Type Description
is_link_to_previous bool True to link the headers and footers to the previous section; False to unlink them.

Example

import groupdocs.watermark as gw
import groupdocs.watermark.contents.wordprocessing as wp

load_options = gw.WordProcessingLoadOptions()
with gw.Watermarker("document.docx", load_options) as watermarker:
    content = watermarker.get_content(wp.WordProcessingContent)
    for i in range(1, content.sections.count):
        content.sections[i].headers_footers.link_to_previous(True)
    watermarker.save("document.docx")

See Also