cognidox / OfficeToPDF

A command line tool to convert Microsoft Office documents to PDFs
https://www.cognidox.com/
Other
609 stars 137 forks source link

Crash when converting docx to pdf #60

Open thaiminhlien opened 4 years ago

thaiminhlien commented 4 years ago

Unfortunately, I get this error when using your tool in server side asp.net mvc. I opened 2 browser tab and try to convert docx to pdf in the same time. Does it support to run on this platform?

System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used. at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease) at Microsoft.Office.Interop.Word.ApplicationClass.Quit(Object& SaveChanges, Object& OriginalFormat, Object& RouteDocument) at OfficeToPDF.WordConverter.CloseWordApplication(Application word) in D:\OfficeToPDF-master\OfficeToPDF-master\OfficeToPDF\WordConverter.cs:line 575 at OfficeToPDF.WordConverter.Convert(String inputFile, String outputFile, Hashtable options) in