diff --git a/www/printer.js b/www/printer.js index 9b1c7977..0413dd90 100755 --- a/www/printer.js +++ b/www/printer.js @@ -135,6 +135,16 @@ exports.print = function (content, options, callback, scope) { exports.mergeWithDefaults = function (options) { var defaults = this.getDefaults(); + //check if options are empty + if( options === undefined + || options == undefined + || options == null + || JSON.stringify(options) == "undefined" + || JSON.stringify(options) === undefined + || JSON.stringify(options) === JSON.stringify({}) ){ + return defaults; + } + if (options.bounds && !options.bounds.length) { options.bounds = [ options.bounds.left || defaults.bounds[0],