From cb3cb10b9d554d0ffc5d9de2ed0f7b79707bbe32 Mon Sep 17 00:00:00 2001 From: Cosmo Date: Fri, 5 Aug 2016 04:21:37 -0700 Subject: [PATCH 1/2] Expose the zoomFactor The zoomFactor is an important factor when rendering the webpage. Please expose it:) --- lib/scripts/pdf_a4_portrait.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/scripts/pdf_a4_portrait.js b/lib/scripts/pdf_a4_portrait.js index 414cfee..405b610 100755 --- a/lib/scripts/pdf_a4_portrait.js +++ b/lib/scripts/pdf_a4_portrait.js @@ -35,6 +35,7 @@ var page = webpage.create() if (options.httpHeaders) page.customHeaders = options.httpHeaders if (options.viewportSize) page.viewportSize = options.viewportSize +if (options.zoomFactor) page.zoomFactor = options.zoomFactor if (options.base) page.setContent(json.html, options.base) else page.setContent(json.html, null) From 8de2fefdeddf24bbb803339aacde0ef8dedd082d Mon Sep 17 00:00:00 2001 From: Cosmo Date: Fri, 5 Aug 2016 04:25:24 -0700 Subject: [PATCH 2/2] Upate Readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b2e7122..881df2c 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,9 @@ config = { // Rendering options "base": "file:///home/www/your-asset-path", // Base path that's used to load files (images, css, js) when they aren't referenced using a host + + // Zooming options + "zoomFactor": "1", // default is 1 // File options "type": "pdf", // allowed file types: png, jpeg, pdf