Artículos con :
Cerrar
Changelog
Cerrar
Pruébelo en la nube
Centro de ayuda
integración

About the ONLYOFFICE and Alfresco integration

ONLYOFFICE offers an official connector to integrate ONLYOFFICE Docs with Alfresco to create, edit, and convert office documents within the document library. You can download the ONLYOFFICE connector from the official Alfresco Add-ons directory or the ONLYOFFICE GitHub page.

To learn more about the ONLYOFFICE and Alfresco module and how it works in detail, please, visit our API documentation.

Main features

  • Creating, editing and viewing text documents, spreadsheets, and presentations.
  • Converting files.
  • Co-editing documents in real-time: two co-editing modes (Fast and Strict), the Track Changes mode, comments, and the built-in chat.
  • JWT support to secure your traffic so that no one can have access to your documents with the exception of the users with proper rights.

Supported formats

  • For creating, editing and viewing: DOCX, PPTX, XLSX
  • For working with forms: OFORM, DOCXF
  • For conversion: ODT, ODP, ODS, DOC, XLS, PPT, RTF
  • For editing via conversion to OOXML: ODP, ODS, ODT, RTF, CSV, TXT
  • For viewing only: PDF

What's new in version 6.0.0

Added

  • Creating new file from document editor
  • Creating new file from document editor from document template
  • Add action "download as" from document manager
  • Compare file from storage
  • Mail merge from storage
  • Insert image from storage
  • Add history of file changes, highlighting changes between versions
  • Customization document editor view
  • Mark as favorite from document editor
  • Add goBack url for document editor
  • Change favicon in editor by document type
  • Detecting mobile browser
  • Galician empty file templates

Fixed

  • Loading preview on document-details page
  • Bug when user with role CONTRIBUTOR can't join to editing
  • Document Server v6.0 and earlier is no longer supported

The full change log is available here.

Connecting ONLYOFFICE Docs to Alfresco Share

Requirements

  • ONLYOFFICE Document Server v7.1 or later

    You need an instance of ONLYOFFICE Docs that is resolvable and connectable both from Alfresco and any end clients. It must be able to POST to Alfresco directly.

    Please refer to the official documentation page to learn more about installing ONLYOFFICE Docs.

    You can also use ONLYOFFICE Docs Cloud (SaaS version).

  • Alfresco v.5.2 - 7.2
  • ONLYOFFICE Connector 6.0.0 for Alfresco

Installing ONLYOFFICE and Alfresco module package

The latest compiled package files are available on GitHub. You need the onlyoffice-integration-repo.jar and the onlyoffice-integration-share.jar files. If you plan to compile the ONLYOFFICE and Alfresco module package yourself for some reason (e.g. edit the source code and compile it afterwards), address the developer instruction.

  1. Download compiled packages in the repo and share directories:
    cd onlyoffice-alfresco/
    mvn clean install
  2. Upload the compiled *.jar packages to directories accordingly for your Alfresco installation:
    • from onlyoffice-alfresco/repo/target/ to the /webapps/alfresco/WEB-INF/lib/ for Alfresco repository.
    • from onlyoffice-alfresco/share/target/ to /webapps/share/WEB-INF/lib/ for Share.
  3. (Optional) Edit the alfresco-global.properties file to specify correct hostnames, open ports and protocols as alfresco and share are deployed as two separate services.

    alfresco.host=<hostname>
    alfresco.port=443
    alfresco.protocol=https
    
    share.host=<hostname>
    share.port=443
    share.protocol=https
  4. Restart Alfresco
    sudo ./alfresco.sh stop
    sudo ./alfresco.sh start
  5. Check if the module is present in the list at /share/page/console/admin-console/module-package.

Configuring ONLYOFFICE and Alfresco module package

Go to Alfresco Administration Console. Open http://<alfrescohost>/alfresco/s/onlyoffice/onlyoffice-config and specify the following parameters.

Document Server settings:

  • Document Editing Service address - specify the URL address where the Document Editing Service is installed.
    ImportantThe address of ONLYOFFICE Docs must be accessible from Alfresco, as well as the address of Alfresco must be accessible from ONLYOFFICE Docs.
  • Secret Key - specify the secret used to sign the data.
    Starting from ONLYOFFICE Docs v7.2, JWT is enabled by default and the secret key is generated automatically. You need to enable it on the Alfresco side as well: find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings. For more details, see the Enabling JWT for the ONLYOFFICE and Alfresco integration section of this article.

Advanced server settings:

  • Document Editing Service address for internal requests from the Alfresco server - specify the address that is used to access Document Editing Service from Alfresco server.
  • Alfresco server address for internal requests from the Document Editing Service - specify the address that is used to access Alfresco server from Document Editing Service.

Common settings:

  • Ignore SSL Certificate - turns SSL off.
  • Enable Force Save - enables saving document changes directly to the Alfresco storage after clicking the Save button (if disabled, the document is saved in the document editor's cache until the document is closed).
  • Save docx, xlsx, pptx as a new version of the original file after conversion - if disabled, a separate file will be created and placed in the same folder.
  • Open the file for editing - allows administrators to choose the document formats to edit via conversion to OOXML formats.
Settings_menu Settings_menu

Enabling JWT for the ONLYOFFICE and Alfresco integration

To protect documents from unauthorized access, ONLYOFFICE editors use the JSON Web Token (JWT). The token is added in the configuration when the Document Editor is initialized and during the exchange of commands between inner ONLYOFFICE Docs services. The secret key is used to sign the JSON web token and validate the token upon the request to ONLYOFFICE Docs.

Starting from ONLYOFFICE Docs v7.2, JWT is enabled by default and the secret key is generated automatically. You need to find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings.

Step 1: Find your secret key in the ONLYOFFICE Docs configuration file

  1. Open the local.json file with any available text editor.
    • For Linux - /etc/onlyoffice/documentserver/local.json
    • For Windows - %ProgramFiles%\ONLYOFFICE\DocumentServer\config\local.json
    • For Docker – enter the ONLYOFFICE Docs container using the docker exec -it <containerID> bash command and open /etc/onlyoffice/documentserver/local.json

      Alternatively, you can use the following command to find the default secret key without opening local.json:

      sudo docker exec <containerID> /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/local.json 'services.CoAuthoring.secret.session.string'

    The local.json file should look like this:

    {
      "services": {
        "CoAuthoring": {
          "token": {
            "enable": {
              "request": {
                "inbox": true,
                "outbox": true
              },
              "browser": true
            }
          },
          "secret": {
            "inbox": {
              "string": "yoursecret"
            },
            "outbox": {
              "string": "yoursecret"
            },
            "session": {
              "string": "yoursecret"
            }
          }
        }
      }
    }
    
  2. The true value is specified in three sections. It means that token validation is enabled.
    • services.CoAuthoring.token.enable.browser
    • services.CoAuthoring.token.enable.request.inbox
    • services.CoAuthoring.token.enable.request.outbox
  3. The automatically generated secret key is specified in three sections. You can replace the default secret value with your own secret key. The secret key must be the same in three sections.
    • services.CoAuthoring.secret.inbox.string
    • services.CoAuthoring.secret.outbox.string
    • services.CoAuthoring.secret.session.string
  4. If you make changes, save them and restart the services for the config changes to take effect.
    supervisorctl restart all

Step 2: Specify the same secret key in the connector settings

In the connector settings, specify the same secret in the Secret key field and save the settings.

Connecting to the demo ONLYOFFICE Docs

Starting from ONLYOFFICE connector version 5.0.0, you can try ONLYOFFICE online editors within Alfresco without installing ONLYOFFICE Docs.

To turn the connection on, click the Connect to demo ONLYOFFICE Document Server checkbox and click the Save button.

This is a public test server that will be available during a 30-day period. Don’t share your sensitive data there.

Start using ONLYOFFICE Docs within Alfresco

To create a document:

  1. Open the folder where you want to create a document.
  2. Click the Create... button.
  3. Choose the file type you want to create: Document, Spreadsheet or Presentation.
new_menu new_menu

To edit or view a document:

  1. Find the required document.
  2. Click the Edit in ONLYOFFICE button.
edit_menu edit_menu

To convert a non-XML document into XML format (DOCX, XLSX or PPTX):

  1. Find the required document.
  2. Click the Convert using ONLYOFFICE button.

The document will be automatically converted into its XML analog. Resulting files are placed in the same folder. You can also configure automatic converting rules for a folder. For more information about the rule configuration, please read the official Alfresco documentation.

convert_menu convert_menu

To download the file in a preferred format:

  1. Find the required file.
  2. Click the Download as... button and choose the format you need.
download_menu download_menu

To see the history of file changes:

  1. Click the file name or its icon to open the file details tab.
  2. Find the Version History tab in the right panel.
  3. The available sections are: Latest Version and Older Versions. The changes made to the file will be highlighted.
  4. To upload a new version, click the corresponding icon in the top right corner.
  5. To quickly see the current file version, hover the mouse pointer over the file. The version number will be displayed to the right of the file name, e.g. .

or

  1. Go to the File tab in the editor.
  2. Choose the Version History option in the menu.

To create a new file right in the Document Editor:

  1. Open the File tab.
  2. Click the Create New option.

A new .docx file will be opened in a new tab.

To create custom templates:

  1. Log in to your Alfresco portal as administrator who created it.
  2. Go to My files -> Data Dictionary -> Node Templates.
  3. Add custom templates in the available formats: .docx, .xlsx, .pptx.
create_template create_template

To create documents from templates:

  1. Open the folder where you want to create a document.
  2. Click the Create... button.
  3. Select the Create document from template option and choose one of the available templates.
    create_from_template create_from_template

    or

  1. In the editor go to the File tab.
  2. Click the Create New... option.
  3. Choose the required template.
    create_from_template_editor create_from_template_editor

To learn how to compare files from storage, please follow the instructions from this article.

compare_files compare_files

To learn how to use mail merge from storage, please follow the instructions from this article.

mail_merge mail_merge

To learn how to insert images from storage, please follow the instructions from this article.

insert_images insert_images

To learn how to mark the document as favorite right in the Document Editor, please follow the instructions from this article.

mark_fav mark_fav
Download Best editors on your website Let your site users view, edit and collaborate
on all types of text, spreadsheet and presentation files
También le podría gustar:
Cerrar