Пример #1
0
        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);
        }
Пример #2
0
        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);
        }