Skip to content

[Bug] Insert footer and header according to documentation #3159

Open
@scagroup

Description

@scagroup

This is:

- [ ] a bug report

What is the expected behavior?

Insert footer and header according to documentation.

What is the current behavior?

There is no footer or header in the document.

What are the steps to reproduce?

        $r1 = IOFactory::load('/app/' . 'tmp'. '/' . 'singAnPropasal.xlsx');
        $r1 ->getActiveSheet()
            ->getHeaderFooter()
            ->setFirstFooter("&C myFooter")
            ->setOddFooter("&C myFooter")
            ->setFirstHeader("&C myFooter")
            ->setEvenHeader("&C myFooter")
            ->setOddHeader("&C myFooter")
            ->setEvenFooter("&C myFooter")
        ;
        $w1 = IOFactory::createWriter($r1, 'Mpdf');
        dd($w1->generateHtmlFooter());

        header('Content-Type: application/pdf');
        header('Content-Disposition: inline; filename="mpdf.pdf"');

        return $w1->save('php://output');

dd return

image

Save result in pdf -> no footer

Which versions of PhpSpreadsheet and PHP are affected?

Checked on both 1.25 and 1.24

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions