Error: [“Syntax Error: Unexpected end of input”,“Syntax Error: Unexpected end of input”]
DocumentBuilder version: 8.2.0
Installation method:
OS: Win 10
Question 1. An error occurred in the attachment when executing the script :
[“Syntax Error: Unexpected end of input”,“Syntax Error: Unexpected end of input”]
Question 2. Why does the size of the attachment change every other time, sometimes it decreases and increases.
Purpose: If the attachment has not changed (has not been reviewed), do not resave the attachment.
Since the signature (SignCMS) is invalid due to resaving
builder.OpenFile("test.docx");
var oDocument = Api.GetDocument();
var oReviewReport = oDocument.GetReviewReport();
if(Object.keys(oReviewReport).length){
oDocument.AcceptAllRevisionChanges();
builder.SaveFile("docx", "test.docx");
}
builder.CloseFile();