diff --git a/lib/Converter.js b/lib/Converter.js index f94d719..1d15d6d 100644 --- a/lib/Converter.js +++ b/lib/Converter.js @@ -94,6 +94,12 @@ class Converter delete options.pageWaitFor; } + if (options.hasOwnProperty('height')) { + if(options.height === 'auto'){ + options.height = await page.evaluate(() => document.body.scrollHeight); + } + } + return this._getPdf(page, options) }