Skip to content

Commit ef03a37

Browse files
zmedgyesmarcbachmann
authored andcommitted
Add cliOptions option and pass it to child process
If run as windows service, use cliOptions = { detached:true} to avoid error: SetProcessDpiAwareness failed: "COM error 0x80070005 (Unknown error 0x0ffffffff80070005)"
1 parent b672aa8 commit ef03a37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pdf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ PDF.prototype.toFile = function PdfToFile (filename, callback) {
8484
}
8585

8686
PDF.prototype.exec = function PdfExec (callback) {
87-
var child = childprocess.spawn(this.options.phantomPath, [].concat(this.options.phantomArgs, [this.script]))
87+
var child = childprocess.spawn(this.options.phantomPath, [].concat(this.options.phantomArgs, [this.script]), this.options.cliOptions)
8888
var stderr = []
8989

9090
var timeout = setTimeout(function execTimeout () {

0 commit comments

Comments
 (0)