Document

Description

The document section allows to change all the parameters pertaining to the document (title, url, file type, etc.).

Parameters
Name Description Type Example
Defines the type of the file for the source viewed or edited document. string "docx", "xlsx", "pptx", "ppsx",
"doc", "xls", "ppt", "pps",
"odt", "ods", "odp",
"txt", "rtf", "csv",
"mht", "html", "htm", "epub",
"pdf", "djvu", "xps"
Defines the unique document identifier used for document recognition by the service. In case the known key is sent the document will be taken from the cache. Every time the document is edited and saved, the key must be generated anew. The document url can be used as the key but without the special characters and the length is limited to 20 symbols. string "Khirz6zTPdfd7"
Defines the desired file name for the viewed or edited document which will also be used as file name when the document is downloaded. string "Example Document Title.docx"
Defines the URL where the source viewed or edited document is stored. string "http://example.com/url-to-example-document.docx"
* - required field
Example
var docEditor = new DocsAPI.DocEditor("placeholder", {
    "document": {
        "fileType": "docx",
        "key": "Khirz6zTPdfd7",
        "title": "Example Document Title.docx",
        "url": "http://example.com/url-to-example-document.docx",
    },
    ...
});

Where the example.com is the name of the the server where document manager and document storage service are installed. See the How it works section to find out more on Document Server service client-server interactions.

The key characters can be used: 0-9, a-z, A-Z, -._=. The maximal key length is 20 characters.