diff --git a/src/templates/__tests__/pdffactory.test.js b/src/templates/__tests__/pdffactory.test.js index 412415b..b3cf0d1 100644 --- a/src/templates/__tests__/pdffactory.test.js +++ b/src/templates/__tests__/pdffactory.test.js @@ -94,7 +94,7 @@ describe('PDF Factory', () => { expect(page.pdf).toHaveBeenCalledWith( expect.objectContaining({ width: '80mm', - height: '121px', + height: '122px', }) ); }); diff --git a/src/templates/pdffactory.js b/src/templates/pdffactory.js index e30cd22..d3a41cd 100644 --- a/src/templates/pdffactory.js +++ b/src/templates/pdffactory.js @@ -129,7 +129,7 @@ export async function generatePDF(html, options = {}) { printBackground: true, preferCSSPageSize: true, width: options.width ? `${options.width}mm` : undefined, - height: height ? (options.height == 'auto' ? `${height + 1}px` : `${height}mm`) : undefined, + height: height ? (options.height == 'auto' ? `${height + 2}px` : `${height}mm`) : undefined, margin: { top: '0mm', right: '0mm',