Skip to content

manual page break causes error "Call to a member function getSkipped() on null" #18

@antman3351

Description

@antman3351

Hi,

When using a manual page-break with $table->addPageBreak() I get the following error

Call to a member function getSkipped() on null in /vendor/evosys21/pdflib/src/Table.php@1506

I think the issue is 'new_page' in line 1437 and 1489 should be self::TB_DATA_TYPE_INSERT_NEW_PAGE in Table.php

constant

const TB_DATA_TYPE_INSERT_NEW_PAGE = 'insert_new_page';

addPageBreak()

pdflib/src/Table.php

Lines 745 to 751 in 480c76c

public function addPageBreak()
{
$this->dataCache[] = array(
'HEIGHT' => 0,
'DATATYPE' => self::TB_DATA_TYPE_INSERT_NEW_PAGE
);
}

insertNewPage()

pdflib/src/Table.php

Lines 1435 to 1438 in 480c76c

$aDC[$index + $shift] = array(
'HEIGHT' => 0,
'DATATYPE' => 'new_page'
);

cachePrepOutputData()

pdflib/src/Table.php

Lines 1489 to 1493 in 480c76c

if ($val['DATATYPE'] == 'new_page') {
//add a new page
$this->addPage();
continue;
}

Metadata

Metadata

Assignees

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