Not able to load document in case of character ‘:’ exist in file name.
If character colon ‘:’ exist in file name ,
sample code:
import com.aspose.words.Document;
public class TestMain {
public static void main(String[] args) {
String filePath = "/home/mohitkumar/data/1005/template/222222/11111/My: Tmp M1.docx";
loadFile(filePath);
}
public static void loadFile(String filePath) {
Document document = null;
try {
document = new Document(filePath);
} catch (Exception ex) {
throw new RuntimeException("Not able to read file : " + filePath + ex.getMessage());
}
System.out.println(document.getOriginalFileName());
}
}