Html-Pdf not creating file on IIS Server with Node.js


I am using html-pdf package in node.js to create a PDF file from a Html string, when i do it localhost it works fine, but when i deploy to iis server it raises the following error:

SetProcessDpiAwareness failed: "COM error 0x80070005 (Unknown error 0x0ffffffff80070005).

I'm using the following code :

var pdf = require('html-pdf');


var html = '<html><head></head><body>Hello World!</body></html>'; 
var options = { format: 'Letter' };

pdf.create(html, options).toFile(fileNamePath, function (err) {

    if(err) {
asked on Stack Overflow Jun 16, 2016 by Pl4tinum • edited Jun 16, 2016 by MichaĆ«l Azevedo

1 Answer


Problem solved:

I was using V2.0.1 of html-pdf and downgrade to v1.5.0 and it works fine. I think the problem is in phantomjs that html-pdf uses, and in this case i am using V1.9.19.

answered on Stack Overflow Jun 17, 2016 by Pl4tinum

User contributions licensed under CC BY-SA 3.0