try {
File file =
showFileContentService.createSpecificFileToBeViewed(
presentationFile.getName(),
presentationFile.getPath());
FileType fileType = FileType.getFileTypeByFileName(file.getName());
RenderedFileType renderedFileType = RenderedFileType.getRenderedFileType(fileType);
PresentationFile<?> presentationFileToBeViewed;
if (renderedFileType == RenderedFileType.TEXT) {
presentationFileToBeViewed =
new PresentationFile<String>(presentationFile.getName(), presentationFile