static TextractDocument PrepareDocument(TextractTextAnalysisService textractAnalysisClient, string type) { var task = textractAnalysisClient.StartDocumentAnalysis(BucketName, FormFile, type); var jobId = task.Result; textractAnalysisClient.WaitForJobCompletion(jobId); var results = textractAnalysisClient.GetJobResults(jobId); return(new TextractDocument(results)); }