ONLYOFFICE Docs v6.4 with conditional formatting, new scaling options, and WOPI protocol support
ONLYOFFICE Docs v6.4 released

Running example script creates invalid docx-file that cannot be opened

DocumentBuilder version: recent
Installation method: windows setup
OS: windows 10

Hi,

I am trying out onlyoffice document builder. Right now I am trying to get the examples to run locally. I have followed the getting started instructions here and downloaded the setup for windows and run it successfully.

However the create document example ONLYOFFICE Api Documentation - Structure of a text document (and other examples as well) don’t work as expected. I have used the script in the example and run it locally on my pc. The script runs fine but when I try to open the generated docx file I get a warning about unreadable content in the file and it doesn’t open.

Actually I can run a script which generates a valid docx file here: ONLYOFFICE Api Documentation - Overview but can’t generate a valid docx file if I run the exact same script locally. I have tried running it in windows powershell as an admin and it didn’t change anything.

There appear two warnings. The first says “Word has found unreadable content” [would you like to proceed yes/no/] and after that another warning dialog appears which lists: Error when opening in word. Check file rights for the document / drive. Ensure there is enough ram provided. open with the restore converter.
THere is enough ram provided and I have write rights in the drive/folder.

Please help I am confused what I may be doing wrong.

When I tell word to recover any corrupted file and open the file generated by documentbuilder this way it shows me this:

customXml/item1.xmlEÁ

9Ç^J6;zÍMˆH5[Cò:W›6YBZb

customXml/_rels/item1.xml.relsÏÁjÃ0

W1º/Nv(e

%…]£$¦±e,u,o_

S

customXml/item1.xmlPK

customXml/_rels/item1.xml.relsPK

The file has been generated by running the Change the text font family example: Set font family for part of text or single word (text documents)

Hi, I’m not sure if this is a bug or a lack of permissions, but please try to save the file not in the builder directory, but to some directory like in our sample scripts:
builder.SaveFile("docx", "./TESTFILES/sample1.docx");
This way the files are generated correctly, the issue is reproduced only when saving directly to C:\ONLYOFFICE\DocumentBuilder

We added a bug regarding this issue to our internal tracker. Bug number is 53609.