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

Fix band() adding extra margin when multiple cells wrap #260

Open gillsonkell opened 2 years ago

gillsonkell commented 2 years ago

If more than one cell wraps you get somewhere around twice the margin below the band. For example:

new Report('test.pdf')
  .data({})
  .detail(report => {
    report.band([
      {data: '123456789'},
      {data: '123456789'}
    ], {
      wrap: true
    });
    report.print('Hello, world!');
  })
  .render(err => {
    if (err) throw err;
  });

This results in a larger-than-expected gap between the band and the text "Hello, world!"