Class TextExtractor
Class TextExtractor
Numele spaţiului: Aspose.Pdf.Plugins Asamblare: Aspose.PDF.dll (25.4.0)
Plug-in pentru TextExtractor.
public class TextExtractor : PdfExtractor, IPlugin, IDisposable
Inheritance
object ← PdfExtractor ← TextExtractor
Implements
Membrii moștenitori
PdfExtractor.Process(IPluginOptions) , PdfExtractor.Dispose() , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Exemplul arată cum să extrageți conținutul text din documentul PDF.
// create TextExtractor object to extract text in PDF contents
using (TextExtractor extractor = new TextExtractor())
{
// create TextExtractorOptions
textExtractorOptions = new TextExtractorOptions();
// add input file path to data sources
textExtractorOptions.AddDataSource(new FileDataSource(inputPath));
// perform extraction process
ResultContainer resultContainer = extractor.Process(textExtractorOptions);
// get the extracted text from the ResultContainer object
string textExtracted = resultContainer.ResultCollection[0].ToString();
}
Remarks
Obiectul Aspose.Pdf.Plugins.TextExtractor este utilizat pentru a extrage text în documente PDF.
Constructors
TextExtractor()
public TextExtractor()