# Render text documents as HTML, PDF, and image files This topic describes how to use the GroupDocs.Viewer Java API to convert text files to HTML, PDF, PNG, and JPEG formats. [GroupDocs.Viewer for ...... LoadOptions loadOptions = new LoadOptions(FileType.MD); //...to PDF. try (Viewer viewer = new Viewer(inputStream, loadOptions))...