Skip to content

[Bug]: images in header #3542

Answered by jorgedav-id
ziolupo68 asked this question in Q&A
Feb 17, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

You should add the &G code in the Header on setOddHeader("Packing List"), here is an example:

public function registerEvents(): array
    {
        return [
            BeforeSheet::class => function(BeforeSheet $event) {
                $sheet = $event->getDelegate();
                $logo = new HeaderFooterDrawing();
                $logo->setName('logo ');
                $logo->setPath(public_path('/images/logo.png'));
                $logo->setHeight(40);
                $sheet->getHeaderFooter()->setOddHeader('&L&G &C&B Header Example');
                $sheet->getHeaderFooter()->addImage($logo, HeaderFooter::IMAGE_HEADER_LEFT);
                $sheet->getHeaderFooter()->setOddFooter('

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ziolupo68
Comment options

@jorgedav-id
Comment options

Answer selected by ziolupo68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants
Converted from issue

This discussion was converted from issue #3541 on February 17, 2022 16:44.