Class TextExtractor
Class TextExtractor
Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll
TextExtractorプラグインを表します。
public class TextExtractor : PdfExtractor, IPlugin, IDisposable
継承
object ← PdfExtractor ← TextExtractor
実装
継承されたメンバー
PdfExtractor.Process(IPluginOptions), PdfExtractor.Dispose(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
例
この例では、PDFドキュメントのテキストコンテンツを抽出する方法を示します。
// PDFコンテンツからテキストを抽出するためのTextExtractorオブジェクトを作成
using (TextExtractor extractor = new TextExtractor())
{
// TextExtractorOptionsを作成
textExtractorOptions = new TextExtractorOptions();
// データソースに入力ファイルパスを追加
textExtractorOptions.AddDataSource(new FileDataSource(inputPath));
// 抽出処理を実行
ResultContainer resultContainer = extractor.Process(textExtractorOptions);
// ResultContainerオブジェクトから抽出されたテキストを取得
string textExtracted = resultContainer.ResultCollection[0].ToString();
}
備考
Aspose.Pdf.Plugins.TextExtractorオブジェクトは、PDFドキュメント内のテキストを抽出するために使用されます。
コンストラクター
TextExtractor()
public TextExtractor()