Skip to content

Want to remove the header and footer for downloaded pdf file #4

@chaluvadiswamy

Description

@chaluvadiswamy

When i tried to remove the header and footer and to download the pdf ,then i open it gives me below error.in screen shot

pdf

Is there any option to create the pdf with different custom layout option, without using the default.ctp

I have tried by creating the new file called empty.ctp and done below code but it is not wotking

$filename = 'userlabel';
$this->viewBuilder()
->className('Dompdf.Pdf')
->layout('Dompdf.empty')
->template('pdf/pdflabel')
->options(['config' => [
'orientation' => 'landscape',
'size' => 'A4',
'filename' => $filename,
'render' => 'download',
]]);
Can any one please help me in this issue. Thanks In Advance ......!
userlabel.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions