Most of the time I encounter no problems when converting from a Word Document to a PDF. I have, however, a specific Word document that causes the SaveToFile method to hang indefinitely when attempting to convert this particular document. It has no issue when converting the same document to text (FileFormat.Txt).
The code is reasonably straight-forward:
- Code: Select all
doc = new Document();
doc.LoadFromFile(source);
doc.ClearMacros();
// Save to PDF file
doc.SaveToFile(destination, FileFormat.PDF);
It hangs on the last line.
I am using version 6.1 with hotfix 6.4.5 and have attached a copy of the problem document.
Login to view the files attached to this post.