Hi,
In some cases, when I try to convert a document with format docx to pdf, the code throws the exception "An unhandled exception of type 'System.StackOverflowException' occurred in System.Drawing.dll".
I don't know if this exception is generated for the content of document.
I attach the document, that I can't convert to pdf.
The code:
public static void conversionDoc() {
string fileRoot = @"C:\Legalitas_Temp\20160112125241_Multa1.docx";
FileInfo f = new FileInfo(fileRoot);
Document doc = new Document();
doc.LoadFromFile(fileRoot,Spire.Doc.FileFormat.Doc);
string fileName = f.Name;
fileName = fileName.Replace(".doc", ".pdf");
string newFileToSave = f.FullName.Replace(f.Name, fileName);
doc.SaveToFile(newFileToSave, Spire.Doc.FileFormat.PDF);
}
Thanks!