Skip to content
Snippets Groups Projects
Commit c4b7b369 authored by S.Listl's avatar S.Listl
Browse files

DocxTemplater_lib

parent bfdd3d4e
No related branches found
No related tags found
No related merge requests found
import("DocxTemplater_lib");
import("Binary_lib");
import("Communication_lib");
import("system.neon");
......@@ -707,12 +708,8 @@ TemplateHelper._getReplacedDOCX = function (pTemplate, pReplacements)
for (let placeholder in pReplacements) //removes the prefix and postfix, the process needs it like this
replacements[placeholder.slice(2, -2)] = pReplacements[placeholder];
//this is executed as a process because of better performance
var documentData = process.execute("getDocxDocument_serverProcess", {
templateb64: pTemplate.content,
placeholderConfig: JSON.stringify(replacements) //process.execute is only able to handle strings
});
var documentData = DocxtemplaterUtils.generateDocument(pTemplate.content, replacements, "{@", "@}");
return documentData;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.1">
<name>DocxTemplater_lib</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<process>%aditoprj%/process/DocxTemplater_lib/process.js</process>
<variants>
<element>LIBRARY</element>
</variants>
</process>
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment