Categories > OpenTBS with ODT >

Merge document footer in OpenOffice odt

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Jan Mottl
Date: 2016-10-24
Time: 11:26

Merge document footer in OpenOffice odt

Merging of OpenOffice odt document work fine. Tanks for excellent tool. I would like to ask how to merge odt footer which is specified on second page. Thanks for help. Jan


        $TBS = new \App\openTBS\clsTinyButStrong; // new instance of TBS
        $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN); // load the OpenTBS plugin

        $TBS->LoadTemplate(TEMPLATE_PATH, OPENTBS_ALREADY_UTF8);

        // merge document text
        if (isset($pripad)) {
            $TBS->MergeBlock('h', $header);
        }

        // merge document footer - THAT PART DOESN'T WORK
        if (isset($pripad)) {
            $TBS->PlugIn(OPENTBS_SELECT_FOOTER, OPENTBS_DEFAULT);
            $TBS->MergeBlock('h', $header);
        }
By: Skrol29
Date: 2016-11-03
Time: 14:20

Re: Merge document footer in OpenOffice odt

Hi Jan,

As explained in the documentation, the command OPENTBS_SELECT_FOOTER is useless with OFT simply beacause headers and footers are stored in the main sub-file.

Your second code « $TBS->MergeBlock('h', $header) » has no effect because block "h" has already been merged previously. If its' another physical block, then use another name.