Thanks for responding, my Use Case is slightly different - How can I find the name extension of the file that I’m not saving on the disk, but just have it in memory?
Blockquote
@Test
public void testDocumentGeneration() throws Exception{
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.writeln(“Aspose Sample Content for Word file.”);
doc.save("Aspose_NewDoc",SaveFormat.DOCX);
//1. Want to find the name of the
String originalName = doc.getOriginalFileName();
int originalFormat = doc.getOriginalLoadFormat();
System.out.println("originalName: " + originalName + ", originalFormat:" + originalFormat);
doc.save("Aspose_PDF",SaveFormat.PDF);
// want to find the current file name and format
}
Blockquote