NathanaelA / fluentreports

:page_facing_up: Fluent Reports - Data Driven Reporting Engine for Node.js and Browsers :page_facing_up:
https://fluentreports.com
MIT License
377 stars 84 forks source link

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

Open gillsonkell opened 3 years ago

gillsonkell commented 3 years ago

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

beauwest commented 3 years ago

Likely a duplicate of #202

gillsonkell commented 3 years ago

Ah... Interesting. If it's by design that's fine, I can work around it.