diff --git a/process/DocumentTemplate_lib/process.js b/process/DocumentTemplate_lib/process.js
index 898b573bcaa2faf078b657260e33cad21d2011b7..1edd203f8a570b5e39f7ed9d3691377d52fea5ad 100644
--- a/process/DocumentTemplate_lib/process.js
+++ b/process/DocumentTemplate_lib/process.js
@@ -1,3 +1,4 @@
+import("system.logging");
 import("Communication_lib");
 import("system.neon");
 import("Employee_lib");
@@ -158,7 +159,10 @@ DocumentTemplate.prototype.getReplacedContent = function (pReplacements)
 DocumentTemplate.prototype.getReplacedContentByContactId = function (pContactId) 
 {
     var replacements = this._getReplacementsByContactIds([pContactId]); 
-    return this.getReplacedContent(replacements[pContactId]);
+    var content = this.getReplacedContent(replacements[pContactId]);
+    
+    logging.log(JSON.stringify(content, null, "\t"))
+    return util.encodeBase64String(content);
 }
 
 /**
@@ -442,7 +446,7 @@ DocumentTemplate.prototype._getReplacedDOCX = function (pReplacements)
     var replacements = {};
     for (let placeholder in pReplacements)  //removes the prefix and postfix, the process needs it like this
         replacements[placeholder.slice(3, -3)] = pReplacements[placeholder];
-    
+
     //this is executed as a process because of better performance
     var documentData = process.execute("getDocxDocument_serverProcess", {
         templateb64: this.content,