Hi,
Following is the code:
final String wordLocation = TEMPLATE_FOLDER + PATH_SEPERATOR + templateName + ".doc";
com.aspose.words.License license = new com.aspose.words.License();
try {
String path = TEMPLATE_FOLDER + PATH_SEPERATOR + "Aspose.Total.Java.lic";
license.setLicense(path);
} catch (Exception e1) {
e1.printStackTrace();
}
Document doc = new Document(wordLocation);
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
doc.save(buffer, SaveFormat.HTML);
String rawData = buffer.toString();
System.out.println(rawData);
I have attached the template file and the output of System.out.println(rawData); for your reference.
Regards,
rfc!