I have a list in sharepoint online (O365). This is a word template (or could be a doc). I need to find a way to convert this template doc through javascript to a pdf and a new completed work document. So workflow for code would be read data from various lists in sharepoint to get source data. Load word template (or doc) from sharepoint list, find all occorrences in the document and replace with data from other lists. Data could be multi lined, formatted RTF etc and this should be what would appear in the document. Then this document should be saved back to a sharepoint document list and converted to a secure PDF and that added to the same list. This needs to be done in javascript. Code for getting data I am fine with, but not for getting the template, replacing the document with the data, converting it to pdf and saving back. items to find in the document template are of the format {[key=“CODE”,[dataitem]}. Where key is a reference item in the source data for a record and [dataitem] is one or more elements of the record which could be multiple paragraphs of text or rtf data. more examples would be {[key=“SG.1”,“the data is” + [content1] + [content2]]} or {[key=“SG.1.1”,[title] + " " + "[content1]]}
I am looking to see if this product could enable me to do this, or for alternatives?
Thanks