From be8a7a8361645aa66ff89d87c885073f3676cc1a Mon Sep 17 00:00:00 2001 From: ael-code Date: Fri, 21 Oct 2016 20:00:30 +0200 Subject: [PATCH] instruct wkhtmltopdf to insert top/bottom margins added `--margin-top 10` and `-margin-bottom 10` options in the invocation of `wkhtmltopdf`. --- src/generators/html-pdf-cli-generator.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generators/html-pdf-cli-generator.coffee b/src/generators/html-pdf-cli-generator.coffee index 29884af..53e25b9 100644 --- a/src/generators/html-pdf-cli-generator.coffee +++ b/src/generators/html-pdf-cli-generator.coffee @@ -68,7 +68,7 @@ engines = # Save the markup to a temporary file tempFile = fOut.replace /\.pdf$/i, '.pdf.html' FS.writeFileSync tempFile, markup, 'utf8' - SPAWN 'wkhtmltopdf', [ tempFile, fOut ], false, on_error, @ + SPAWN 'wkhtmltopdf', [ '--margin-top', '10', '--margin-bottom', '10', tempFile, fOut ], false, on_error, @ return