Class TextExtractor
Class TextExtractor
Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll
Reprezentuje plugin TextExtractor.
public class TextExtractor : PdfExtractor, IPlugin, IDisposable
Dědičnost
object ← PdfExtractor ← TextExtractor
Implementuje
Děděné členy
PdfExtractor.Process(IPluginOptions), PdfExtractor.Dispose(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Příklady
Příklad ukazuje, jak extrahovat textový obsah PDF dokumentu.
// vytvoření objektu TextExtractor pro extrakci textu v PDF obsahu
using (TextExtractor extractor = new TextExtractor())
{
// vytvoření TextExtractorOptions
textExtractorOptions = new TextExtractorOptions();
// přidání cesty k vstupnímu souboru do datových zdrojů
textExtractorOptions.AddDataSource(new FileDataSource(inputPath));
// provedení procesu extrakce
ResultContainer resultContainer = extractor.Process(textExtractorOptions);
// získání extrahovaného textu z objektu ResultContainer
string textExtracted = resultContainer.ResultCollection[0].ToString();
}
Poznámky
Objekt Aspose.Pdf.Plugins.TextExtractor se používá k extrakci textu v PDF dokumentech.
Konstruktory
TextExtractor()
public TextExtractor()