Skip to content

Commit dbb323d

Browse files
authored
Merge pull request #162 from hackjustu/exposing_zoomFactor
Exposing zoomFactor in options
2 parents ff2fa01 + 8de2fef commit dbb323d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ config = {
114114

115115
// Rendering options
116116
"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
117+
118+
// Zooming options
119+
"zoomFactor": "1", // default is 1
117120

118121
// File options
119122
"type": "pdf", // allowed file types: png, jpeg, pdf

lib/scripts/pdf_a4_portrait.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var page = webpage.create()
3535

3636
if (options.httpHeaders) page.customHeaders = options.httpHeaders
3737
if (options.viewportSize) page.viewportSize = options.viewportSize
38+
if (options.zoomFactor) page.zoomFactor = options.zoomFactor
3839
if (options.base) page.setContent(json.html, options.base)
3940
else page.setContent(json.html, null)
4041

0 commit comments

Comments
 (0)