Class PdfExtractor
Именује се: Aspose.Pdf.Plugins Асамблеја: Aspose.PDF.dll (25.4.0)
Представља основне функције за извлачење текста, слика и других врста садржаја који се могу појавити на страницама ПДФ докумената.
public abstract class PdfExtractor : IPlugin, IDisposable
Inheritance
Derived
ImageExtractor , TextExtractor
Implements
Наслеђени чланови
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Пример показује како извући текстуални садржај из ПДФ документа.
// create TextExtractor object to extract PDF contents
using (TextExtractor extractor = new TextExtractor())
{
// create TextExtractorOptions object to set instructions
textExtractorOptions = new TextExtractorOptions();
// add input file path to data sources
textExtractorOptions.AddInput(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
Objekat Aspose.Pdf.Plugins.TextExtractor se koristi za ekstrakciju teksta, ili Aspose.Pdf.Plugins.ImageExtractor za ekstrakciju slika.
Constructors
PdfExtractor()
protected PdfExtractor()
Methods
Dispose()
Имплементација ИДИСпозибилно. у ствари, то није потребно за ПдфЕкстрактор.
public void Dispose()
Process(ИПЛУГИНОПЦИЈА)
Почиње обрада ПдфЕкстрактора са одређеним параметрима.
public ResultContainer Process(IPluginOptions pdfExtractorOptions)
Parameters
pdfExtractorOptions
IPluginOptions
Опција објекат са упутствима за ПдфЕкстрактор.
Returns
Резултат контејнер објекат који садржи резултат екстракције.