// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java
/**
* This method writes string to output html file
*
* @param outputFileName
* name of the output html file
* @param fileContent
* content to be written in output html file
*/
public static void saveAsHtml(String outputFileName, String fileContent) {
try {
// Initialize PrintWriter for output file
PrintWriter out = new PrintWriter(outputHtmlPath + GetFileNameWithoutExtension(outputFileName) + ".html", "UTF-8");
// Write file content in
out.println(fileContent);
out.flush();
out.close();
} catch (Exception exp) {
System.out.println("Exception: " + exp.getMessage());
exp.printStackTrace();
}
}