Class PdfExtractor
Class PdfExtractor
Namespace: Aspose.Pdf.Plugins
Assembly: Aspose.PDF.dll
PDF 문서 페이지에서 발생할 수 있는 텍스트, 이미지 및 기타 유형의 콘텐츠를 추출하는 기본 기능을 나타냅니다.
public abstract class PdfExtractor : IPlugin, IDisposable
상속
파생
구현
상속된 멤버
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.AddInput(new FileDataSource(inputPath));
// 추출 프로세스 수행
ResultContainer resultContainer = extractor.Process(textExtractorOptions);
// ResultContainer 객체에서 추출된 텍스트 가져오기
string textExtracted = resultContainer.ResultCollection[0].ToString();
}
비고
Aspose.Pdf.Plugins.TextExtractor 객체는 텍스트를 추출하는 데 사용되며, Aspose.Pdf.Plugins.ImageExtractor는 이미지를 추출하는 데 사용됩니다.
생성자
PdfExtractor()
protected PdfExtractor()
메서드
Dispose()
IDisposable의 구현. 실제로 PdfExtractor에 대해 필요하지 않습니다.
public void Dispose()
Process(IPluginOptions)
지정된 매개변수로 PdfExtractor 처리를 시작합니다.
public ResultContainer Process(IPluginOptions pdfExtractorOptions)
매개변수
pdfExtractorOptions
IPluginOptions
PdfExtractor에 대한 지시사항을 포함하는 옵션 객체입니다.
반환
추출 결과를 포함하는 ResultContainer 객체입니다.