I tried to edit one PPTX document "externally" following this steps:
1. I created a PPTX file and opened using Document Editor (DE) based on this example: https://api.onlyoffice.com/editors/basic
2. I closed the DE window, so the changes can be saved.
3. I Created a .docbuilder script like this one:
Code: Select all
builder.SetTmpFolder("TempFolder"); builder.OpenFile("/hdd/myFolder/output.pptx"); var oPresentation = Api.GetPresentation(); var oSlide = oPresentation.GetSlideByIndex(0); oSlide.RemoveAllObjects(); builder.SaveFile("pptx", "/hdd/myFolder/output.pptx"); builder.CloseFile();
I open the file after running the script and the changes were applied correctly. But I open the same file from the DE and the document opens without the changes applied with the Document Builder.
I'am missing something in the script so the changes can be saved permanently in the document.
Thank you in advance.