diff --git a/js/qz-tray.js b/js/qz-tray.js
index ac4d3acfa..cc38dc590 100644
--- a/js/qz-tray.js
+++ b/js/qz-tray.js
@@ -509,6 +509,36 @@ var qz = (function() {
return loc;
},
+ relative: function(data) {
+ for(var i = 0; i < data.length; i++) {
+ if (data[i].constructor === Object) {
+ var absolute = false;
+
+ if (data[i].flavor) {
+ //if flavor is known, we can directly check for absolute flavor types
+ var flavor = data[i].flavor.toUpperCase();
+ if (flavor === 'FILE' || flavor === 'IMAGE' || flavor === 'XML') {
+ absolute = true;
+ }
+ } else if (data[i].format && data[i].format.toUpperCase() !== 'COMMAND' && data[i].format.toUpperCase() !== 'DIRECT') {
+ //if flavor is not known, all valid pixel formats default to file flavor
+ absolute = true;
+ } else if (data[i].type && data[i].type.toUpperCase() === 'PIXEL') {
+ //if all we know is pixel type, then it is image's file flavor
+ absolute = true;
+ }
+
+ if (absolute) {
+ //change relative links to absolute
+ data[i].data = _qz.tools.absolute(data[i].data);
+ }
+ if (data[i].options && typeof data[i].options.overlay === 'string') {
+ data[i].options.overlay = _qz.tools.absolute(data[i].options.overlay);
+ }
+ }
+ }
+ },
+
/** Performs deep copy to target from remaining params */
extend: function(target) {
//special case when reassigning properties as objects in a deep copy
@@ -575,9 +605,9 @@ var qz = (function() {
/**
* Alter any of the printer options currently applied to this config.
- * @param newOpts {Object} The options to change. See qz.config.setDefaults docs for available values.
+ * @param newOpts {Object} The options to change. See qz.configs.setDefaults docs for available values.
*
- * @see qz.config.setDefaults
+ * @see qz.configs.setDefaults
*/
this.reconfigure = function(newOpts) {
_qz.tools.extend(this.config, newOpts);
@@ -901,7 +931,7 @@ var qz = (function() {
*
* @returns {Config} The new config.
*
- * @see config.setDefaults
+ * @see configs.setDefaults
*
* @memberof qz.configs
*/
@@ -921,7 +951,7 @@ var qz = (function() {
* following the format of the "call" and "params" keys in the API call, with the addition of a "timestamp" key in milliseconds
* ex. '{"call":"","params":{...},"timestamp":1450000000}'
*
- * @param {Object} config Previously created config object.
+ * @param {Object|Array