PDF file creation using html-pdf is not working in my deployment server?
<p>I am using html-pdf npm module to create a pdf file, everything is working fine in my local environment (mac, windows). But when we deployed the same code in our amazon ec2 server create() of html-pdf is not able to create file nor giving me any error. I almost tried all possible ways by exception handling, absolute path etc. None of them work. Can anyone help me on this please. my code is </p>

<pre><code>function generatePdf(content, options, callback) {
    var fileName = new Date().getTime() + Math.random() + '.pdf';
    pdf.create(content, options).toFile('../uploads/' + fileName, function(error, response) {
        if (error) {
            callback(error);
        } else {
            callback({
                fileName: fileName,
                filePath: response.filename
            });
        }                                
    });
}
</code></pre>

<p>Here error is {} and the response is {}</p>