Extend Document Preview Capabilities in Liferay DXP

blog-banner

Liferay is widely used for its document management, where we can upload various types of documents like zip, docx, pdf, images, excels etc. But when you try to preview the documents, LR out-of-the-box does not provide any support to preview all types of files; it supports only a few of them.

To overcome this issue, we have created our own custom code, using which users can preview various types of files without downloading them from the portal.

The solution we have implemented will provide support for Liferay DXP versions like 7.3 and 7.4. This will work after deployment of the OSGI module/JAR. We do not need any additional setups. 

Once you deploy the jar file on the server, the service will integrate into Liferay’s default document preview mechanism. Now users can open documents which are stored in the Documents and Media library and view them instantly without downloading them.

Prerequisite

Our solution is tested on Liferay DXP vanilla servers. Please ensure that you do not have any existing modules that override Liferay’s Documents and Media. If any such module exists, it may conflict with our solution. In this case, please contact the Surekhatech support team.

Supported File Types

This module supports direct, in-browser previews for the following: 

  • Microsoft Word (.docx)
  • Microsoft Excel (.xls, .xlsx)
  • Email files (.eml)
  • ZIP files(.zip), with preview support to view list of files and the preview of those files as well.

Key Features

Once the service is deployed, it will integrate into Liferay’s default document preview process. Users can open documents stored in the Documents and Media library and view them instantly, without the need to download or convert files externally.

For ZIP files, the system provides a navigable file tree that allows users to explore the content. Supported files within the archive, such as docx, pdf, image, eml, xls, and xlsx, can be previewed directly for a better user experience.

All files will be previewed and are rendered client-side to ensure fast performance with minimal server overhead. The service also respects Liferay's built-in permission system, so users only have access to previews of files they are authorized to view.

Sample of Zip Preview:

Sample of Zip Preview

Deployment and Usage

  • Download the service JAR from Liferay Marketplace or from SurekhaTech Support Team.
  • Deploy the jar on Liferay DXP 7.3 or 7.4 servers using the standard module deployment approach.
  • There are no configuration steps or post-deployment actions required.

File Preview App Available on Liferay Marketplace

This document preview solution is officially published by SurekhaTech on the Liferay Marketplace, making installation simple and reliable for Liferay DXP users.

You can directly install the app from the Liferay Marketplace using the link below:
https://marketplace.liferay.com/p/file-preview

Installing from the Marketplace ensures compatibility with Liferay DXP 7.3 and 7.4 and allows you to manage updates using Liferay’s standard app management process.

Enable Liferay Document Preview for Zip, Word, Excel, Email files - surekha technologies

Use Cases

This enhancement is especially valuable in scenarios such as:

  • Enterprises that manage a high volume of Office or ZIP-based documents.
  • Teams that collaborate using document bundles or scanned archives.
  • Environments where direct access to email content (.eml) is essential for business processes.
  • By enabling this, the service improves document usability and reduces the need for downloads or other viewing tools.

Conclusion

Instead of downloading and previewing documents now, we can directly preview all types of documents on the portal, which will improve the workflow, productivity, and user experience. The solution is easy to deploy and use; it will reduce the use of third-party tools to preview documents like docx, xlsx, pdf, email, and zip.

Contact us

For Your Business Requirements

Contact us