Skip to content

ONLYOFFICE/onlyoffice-alfresco

Β 
Β 

Repository files navigation

ONLYOFFICE module package for Alfresco

This plugin enables users to create, edit, and collaborate on office documents directly within Alfresco Share using ONLYOFFICE Docs.

ONLYOFFICE for Alfresco

Features ✨

  • Create and edit text documents, spreadsheets, presentations, and PDFs directly in Alfresco Share.
  • Share documents securely with other Alfresco users.
  • Collaborate in real time using:
    • Two co-editing modes (Fast and Strict)
    • Track Changes and version history
    • Comments and built-in chat πŸ’¬

Supported formats πŸ—‚οΈ

For viewing:

  • WORD: DOC, DOCM, DOCX, DOT, DOTM, DOTX, EPUB, FB2, FODT, HTM, HTML, HWP, HWPX, MD, MHT, MHTML, ODT, OTT, PAGES, RTF, STW, SXW, TXT, WPS, WPT, XML
  • CELL: CSV, ET, ETT, FODS, NUMBERS, ODS, OTS, SXC, XLS, XLSM, XLSX, XLT, XLTM, XLTX
  • SLIDE: DPS, DPT, FODP, KEY, ODG, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX, SXI
  • PDF: DJVU, DOCXF, OFORM, OXPS, PDF, XPS
  • DIAGRAM: VSDM, VSDX, VSSM, VSSX, VSTM, VSTX

For editing:

  • WORD: DOCM, DOCX, DOTM, DOTX
  • CELL: XLSB, XLSM, XLSX, XLTM, XLTX
  • SLIDE: POTM, POTX, PPSM, PPSX, PPTM, PPTX
  • PDF: PDF

For editing with possible loss of information:

  • WORD: EPUB, FB2, HTML, ODT, OTT, RTF, TXT
  • CELL: CSV, ODS, OTS
  • SLIDE: ODP, OTP

For converting to Office Open XML formats:

  • WORD: DOC, DOCM, DOCX, DOT, DOTM, DOTX, EPUB, FB2, FODT, HTM, HTML, HWP, HWPX, MD, MHT, MHT, MHTML, ODT, OTT, PAGES, RTF, STW, SXW, TXT, WPS, WPT, XML
  • CELL: CSV, ET, ETT, FODS, NUMBERS, ODS, OTS, SXC, XLS, XLSB, XLSM, XLSX, XLT, XLTM, XLTX
  • SLIDE: DPS, DPT, FODP, KEY, ODG, ODP, OTP, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, PPTX, SXI
  • PDF: DOCXF, OXPS, PDF, XPS

To convert a specific file, select Convert using ONLYOFFICE action. Resulting file will be placed in the same folder. You can also configure rules for a folder, that will automatically convert files on upload or on change. Check details

Installing ONLYOFFICE Docs

ONLYOFFICE Docs (Document Server) must be accessible from both Alfresco and client browsers, and must be capable of sending POST requests to Alfresco.

You can choose between two deployment options:

πŸ–₯️ Self-hosted version

Community Edition vs Enterprise Edition comparison can be found here.

☁️ ONLYOFFICE Docs Cloud

If you prefer not to host or maintain your own server, try ONLYOFFICE Docs Cloud β€” no download or setup required. Get started here

Installing ONLYOFFICE module package for Alfresco πŸ“₯

To start using ONLYOFFICE Document Server with Alfresco, the following steps must be performed for Ubuntu 14.04:

The latest compiled package files are available here.

  1. Upload the compiled *.amp packages to directories accordingly for your Alfresco installation:

    • from onlyoffice-alfresco/repo/target/ to the /usr/local/tomcat/amps/ for Alfresco repository,
    • from onlyoffice-alfresco/share/target/ to /usr/local/tomcat/amps_share/ for Share.
  2. Use the Module Management Tool (MMT) to install modules, run this commands:

    Alfresco:

    java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt.jar install /usr/local/tomcat/amps/onlyoffice-integration-repo.amp /usr/local/tomcat/webapps/alfresco
    

    Share:

    java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt.jar install /usr/local/tomcat/amps_share/onlyoffice-integration-share.amp /usr/local/tomcat/webapps/share
    

    More details about using MMT can be found here https://docs.alfresco.com/content-services/latest/install/zip/amp/

  3. Make sure that Document Server will be able to POST to Alfresco.

    You may need to change these lines in alfresco-global.properties or you can set it using configuration page.

    alfresco.host=<hostname>
    alfresco.port=443
    alfresco.protocol=https
    
    share.host=<hostname>
    share.port=443
    share.protocol=https
    

    Probably located here /usr/local/tomcat/shared/classes/alfresco-global.properties

  4. Restart Alfresco:

    sudo ./alfresco.sh stop
    sudo ./alfresco.sh start

The module can be checked in administrator tools at share/page/console/admin-console/module-package in Alfresco.

Configuration

Module configuration can be found inside Alfresco Administration Console or by simply navigating to http://<alfrescohost>/alfresco/s/onlyoffice/onlyoffice-config

You can also add onlyoffice.url in alfresco-global.properties. Configuration made via settings page will override alfresco-global.properties.

Configuration settings include JWT, enabled by default to protect the editors from unauthorized access. If setting a custom Secret key, ensure it matches the one in the ONLYOFFICE Docs config file for proper validation.

You can set the secret key by adding onlyoffice.security.key to alfresco-global.properties.

Compiling ONLYOFFICE module package for Alfresco

If you plan to compile the ONLYOFFICE module package for Alfresco yourself (e.g. edit the source code and compile it afterwards), follow these steps.

  1. The latest stable Oracle Java version is necessary for the successful build. If you do not have it installed, use the following commands to install Oracle Java 8:

    sudo apt-get update
    sudo apt-get install openjdk-8-jdk
  2. Install latest Maven: Installation process is described here.

  3. Download the ONLYOFFICE module package for Alfresco source code:

    git clone https://github.com/onlyoffice/onlyoffice-alfresco.git
  4. Get a submodule:

    git submodule update --init --recursive
  5. Compile packages in the repo and share directories:

    cd onlyoffice-alfresco/
    mvn clean install

Another way to build ONLYOFFICE module package for Alfresco is using docker-compose file.

Use this command from project directory:

docker-compose up

How it works πŸ› οΈ

The ONLYOFFICE integration follows the API documented here:

  • User navigates to a document within Alfresco Share and selects the Edit in ONLYOFFICE action.
  • Alfresco Share makes a request to the repo end (URL of the form: /parashift/onlyoffice/prepare?nodeRef={nodeRef}).
  • Alfresco Repo end prepares a JSON object for the Share with the following properties:
    • url: the URL that ONLYOFFICE Document Server uses to download the document (includes the alf_ticket of the current user),
    • callbackUrl: the URL that ONLYOFFICE Document Server informs about status of the document editing;
    • onlyofficeUrl: the URL that the client needs to reply to ONLYOFFICE Document Server (provided by the onlyoffice.url property);
    • key: the UUID+Modified Timestamp to instruct ONLYOFFICE Document Server whether to download the document again or not;
    • title: the document Title (name).
  • Alfresco Share takes this object and constructs a page from a freemarker template, filling in all of those values so that the client browser can load up the editor.
  • The client browser makes a request for the javascript library from ONLYOFFICE Document Server and sends ONLYOFFICE Document Server the docEditor configuration with the above properties.
  • Then ONLYOFFICE Document Server downloads the document from Alfresco and the user begins editing.
  • ONLYOFFICE Document Server sends a POST request to the callback URL to inform Alfresco that a user is editing the document.
  • Alfresco locks the document, but still allows other users with write access the ability to collaborate in real time with ONLYOFFICE Document Server by leaving the Action present.
  • When all users and client browsers are done with editing, they close the editing window.
  • After 10 seconds of inactivity, ONLYOFFICE Document Server sends a POST to the callback URL letting Alfresco know that the clients have finished editing the document and closed it.
  • Alfresco downloads the new version of the document, replacing the old one.

ONLYOFFICE Docs editions

ONLYOFFICE offers different versions of its online document editors that can be deployed on your own servers.

  • Community Edition πŸ†“ (onlyoffice-documentserver package)
  • Enterprise Edition 🏒 (onlyoffice-documentserver-ee package)

The table below will help you to make the right choice.

Pricing and licensing Community Edition Enterprise Edition
Get it now Start Free Trial
Cost FREE Go to the pricing page
Simultaneous connections up to 20 maximum As in chosen pricing plan
Number of users up to 20 recommended As in chosen pricing plan
License GNU AGPL v.3 Proprietary
Support Community Edition Enterprise Edition
Documentation Help Center Help Center
Standard support GitHub or paid 1 or 3 years support included
Premium support Contact us Contact us
Services Community Edition Enterprise Edition
Conversion Service + +
Document Builder Service + +
Interface Community Edition Enterprise Edition
Tabbed interface + +
Dark theme + +
125%, 150%, 175%, 200% scaling + +
White Label - -
Integrated test example (node.js) + +
Mobile web editors - +*
Plugins & Macros Community Edition Enterprise Edition
Plugins + +
Macros + +
Collaborative capabilities Community Edition Enterprise Edition
Two co-editing modes + +
Comments + +
Built-in chat + +
Review and tracking changes + +
Display modes of tracking changes + +
Version history + +
Document Editor features Community Edition Enterprise Edition
Font and paragraph formatting + +
Object insertion + +
Adding Content control + +
Editing Content control + +
Layout tools + +
Table of contents + +
Navigation panel + +
Mail Merge + +
Comparing Documents + +
Spreadsheet Editor features Community Edition Enterprise Edition
Font and paragraph formatting + +
Object insertion + +
Functions, formulas, equations + +
Table templates + +
Pivot tables + +
Data validation + +
Conditional formatting + +
Sparklines + +
Sheet Views + +
Presentation Editor features Community Edition Enterprise Edition
Font and paragraph formatting + +
Object insertion + +
Transitions + +
Animations + +
Presenter mode + +
Notes + +
Form creator features Community Edition Enterprise Edition
Adding form fields + +
Form preview + +
Saving as PDF + +
PDF Editor features Community Edition Enterprise Edition
Text editing and co-editing + +
Work with pages (adding, deleting, rotating) + +
Inserting objects (shapes, images, hyperlinks, etc.) + +
Text annotations (highlight, underline, cross out, stamps) + +
Comments + +
Freehand drawings + +
Form filling + +
Get it now Start Free Trial

* If supported by DMS.

Need help? User Feedback and Support πŸ’‘

  • 🐞 Found a bug? Please report it by creating an issue.
  • ❓ Have a question? Ask our community and developers on the ONLYOFFICE Forum.
  • πŸ‘¨β€πŸ’» Need help for developers? Check our API documentation.
  • πŸ’‘ Want to suggest a feature? Share your ideas on our feedback platform.

About

The package which enables the users to edit office documents from Alfresco using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to Alfresco

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 64.4%
  • FreeMarker 26.4%
  • JavaScript 8.7%
  • CSS 0.5%