- Code: Select all
Document doc = new Document();
foreach (string file in files)
{
switch (Path.GetExtension(file))
{
case ".docx":
doc.LoadFromFile(file);
string newFile = Path.GetDirectoryName(file) + "\\" + Path.GetFileNameWithoutExtension(file) + ".pdf";
doc.SaveToFile(newFile, FileFormat.PDF);
break;
}
}
It's getting stuck on the doc.SaveToFile function for a 1,329 KB file. How can I figure out what's going on? Is there a chance that it would take more than a half hour to save a file as pdf?