public override string Extract(Stream stream, TextExtractorContext context) { Task.Run(() => { AsposePreviewProvider.CheckLicense(AsposePreviewProvider.LicenseProvider.Words); var document = new Aspose.Words.Document(stream); IndexingTools.AddTextExtract(context.VersionId, document.GetText()); }); return(string.Empty); }
public override string Extract(Stream stream, TextExtractorContext context) { Task.Run(() => { AsposePreviewProvider.CheckLicense(AsposePreviewProvider.LicenseProvider.Pdf); var document = new Aspose.Pdf.Document(stream); var textAbsorber = new TextAbsorber(); document.Pages.Accept(textAbsorber); IndexingTools.AddTextExtract(context.VersionId, textAbsorber.Text); }); return(string.Empty); }