On convert from PDF to word .docx file, Aspose.PDF crash.
Code used to convert
Aspose.Pdf.DocSaveOptions docsave = new Aspose.Pdf.DocSaveOptions { Format = Aspose.Pdf.DocSaveOptions.DocFormat.DocX, Mode = Aspose.Pdf.DocSaveOptions.RecognitionMode.Flow, ExtractOcrSublayerOnly = false }; Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(input); // Save the output in Docx format pdfDocument.Save(output, docsave);
Exception details:
System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=Aspose.PDF StackTrace: at #=ziJCZIsjDKv0F5YVuG8_K32LiTdiSpIG03h6wwH8=.#=zGiFyOV4=(#=zRjTQFT9ilV3yu7_yL7EPVXU= #=zADgYSGY=, #=zaIXPlFPQ8HuJfUFSaqE22X2cUjzrr0$GiPztMNk= #=z1nIEvlo=) at #=zs0J$cxssuaz_94af9Q==.#=zT7q394Q=(#=zRjTQFT9ilV3yu7_yL7EPVXU= #=zADgYSGY=, Boolean #=z6VH8mQQ=) at #=zs0J$cxssuaz_94af9Q==.#=ztIY961A=() at #=zeK1xysFsatrsGJZZ0a0I8NV9eZADTnW4Lw==.#=z98cgxHc=() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() This exception was originally thrown at this call stack: [External Code]
This crash our main application, how to handle this exception or how to fix this case.
Crash is for particular PDF file, attached a PDF for reference.
Download link: