Is it possible to store the resulting HTML5 files elsewhere? (for example- in memory)

I am trying out the GroupDocs.Viewer in Java.


The ViewerHandler stores the HTML5 files that are generated in the configured directory.

Question: Is it also possible to have more control on where the files are stored? I would like to store the HTML/JS/CSS/Images in memory.

It looks like a custom InputDataHandler could do this, but the JavaDoc for that class is very minimal and unclear to me. Can that class be only be used to control input data, not output data?

What I tried was to wrap a custom class around the LocalInputDataHandler, what I saw was the uploaded file input stream passed to saveFile, getFileList always returns an empty File[] array, getFileType returns the type of the original input file. Nowhere do I see that the HTML5 files are stored anywhere.

Hello Dijk,

The HTML5 data is a cache of the rendered pages. It is generated when the html-rendering mode is enabled. In the image-rendering mode there will be image files instead of HTML5.

Unfortunately, there is no custom cache handling functionality. Can you describe a bit more your use-case? Why do you need to store cache in the memory?


Use case: We have an environment where the documents are stored securely by design. Nobody can view the documents except for those users that have sufficient rights in the system. Not even a database administrator or systems administrator can ever see any data, even if they have physical access to the machines our system runs on.

Using the GroupDocs.Viewer would nullify all that. The generated HTML5 cache would be viewable by anyone with access to that directory.

If we have more control over where to store the files and where to read them from, we could choose to make the cache encrypted, or serve it from memory (or both).

Hello Dijk,

We can put this functionality into our roadmap and implement it. Dependent on how strong you are interested in using GroupDocs.Viewer for Java we may prioritize it to be implemented in nearest releases. But currently we have few requests of our paid customers, so it may be postponed to be done in further releases.

Once we are a paying customer I will remind you of this request.

Ok,
Dijk, thank you for understanding. Anyway, we will put it into our roadmap. If
you need some additional info feel free to contact us.