Skip to content

Page header not appearing when final summary causes page break #238

@gillsonkell

Description

@gillsonkell

With this example:

const {Report} = require('./fluentreports/lib/fluentReports.js');

new Report('test.pdf')
  .data({})
  .pageHeader(r => {
    r.print('Page Header');
  })
  .detail(r => {
    for (let i = 0; i < 40; i++) {
      r.print(`Report Detail ${i}`);
    }
  })
  .finalSummary(r => {
    for (let i = 0; i < 10; i++) {
      r.print(`Report Final Summary ${i}`);
    }
  })
  .render(err => {
    if (err) throw err;
  });

I was expecting my page header to appear on the second page caused by my final summary, but the page header only appears on the first page. Is this the actual expectation or a bug?
test.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions