How to open or view a document with read-only mode in Java

I am looking for a Java solution where I can View all type of Document as Original; however, we want to apply some restrictions during this view just to make it Read Only:

Disable or remove Save or Save As option
Disable or remove Copy option also select & copy inside the displayed page
Disable or remove Print option
Can we also restrict any screen shot capture (Print Screen, Spinning Grabbing Tool)

In other word - open an existing workbook in such read-only mode

Is this something any of your product support?

@sushil82,

Thanks for taking interest in GroupDocs products.

Yes, we have GroupDocs.Viewer that allows rendering 50+ file formats in the form that can be easily viewed/displayed in the front end applications. In fact, GroupDocs.Viewer is a back-end API that renders the pages of the original document as HTML pages or as images. You can select the suitable option for you.

  • HTML based rendering: In HTML based rendering, the API generates the HTML representation of each page of the source document. You can easily manipulate the HTML content of each page and save it as an HTML file. For details, please visit Rendering Documents as HTML.
  • Image-based rendering: In image-based rendering, the API converts each page of the document into an image (PNG, JPG, BMP). You can easily save the image to your desired location and display it in your application to view the content of the document. For details, please visit Rendering Documents as Image.

In both of the above-mentioned ways, the user will not be able to get access to (or download) the original document. Furthermore, GroupDocs.Viewer only provides the back-end features for document rendering and therefore, it does not provide the feature to disable save or print options, text selection or screen capture. However, you can implement them in your front end application to restrict the user from copying. GroupDocs.Viewer also provides the feature of adding watermark to the output HTML pages or images. This feature can also help in document protection.

We would like you to please have a look at the documentation of GroupDocs.Viewer and evaluate its features using the examples. You can also give a try to our open source document viewer application (download) that is based on GroupDocs.Viewer.