Node-html-pdf: unexpected space between <div id="pageHeader"> and next <div>

Created on 28 Feb 2018  路  1Comment  路  Source: marcbachmann/node-html-pdf

my html is the following:

<body>
  <div id="pageHeader" style="padding: 0; margin: 0; background-color: yellow;">ABC</div>
  <div style="background-color: red;">123</div>
</body>

I get pdf with big space between ABC and 123, 5-6 times higher than text.
how to suppress it?

Most helpful comment

I have completely removing whitespaces using

const pdfOptions = {
  format: 'A4',
  border: '0',
  header: {
    height: '0mm',
  },
  footer: {
    height: '0mm',
  },
};

>All comments

I have completely removing whitespaces using

const pdfOptions = {
  format: 'A4',
  border: '0',
  header: {
    height: '0mm',
  },
  footer: {
    height: '0mm',
  },
};
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimit-hothi picture jimit-hothi  路  4Comments

adman020 picture adman020  路  5Comments

RodolfoSilva picture RodolfoSilva  路  3Comments

cmoulliard picture cmoulliard  路  3Comments

Mortuie picture Mortuie  路  4Comments