Class PdfExtractor
ja nimityö: Aspose.Pdf.Plugins Kokoelma: Aspose.PDF.dll (25.4.0)
Se edustaa perustoimintoa tekstiä, kuvia ja muita sisältömuotoja, jotka saattavat esiintyä PDF-tiedostojen sivuilla.
public abstract class PdfExtractor : IPlugin, IDisposable
Inheritance
Derived
ImageExtractor , TextExtractor
Implements
Perintöjäsenet
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Esimerkki osoittaa, miten teksti sisältöä voidaan poistaa PDF-dokumentista.
// 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
Aspose.Pdf.Plugins.TextExtractor -objektiä käytetään tekstiä tai Aspose.Pdf.Plugins.ImageExtractor -objektia kuvien tuottamiseen.
Constructors
PdfExtractor()
protected PdfExtractor()
Methods
Dispose()
Implementation of IDisposable. Itse asiassa se ei ole välttämätöntä PdfExtractor.
public void Dispose()
Process(IPluginoptiot)
PdfExtractorin käsittely käynnistyy määritellyt parametrit.
public ResultContainer Process(IPluginOptions pdfExtractorOptions)
Parameters
pdfExtractorOptions
IPluginOptions
Vaihtoehto esine, joka sisältää ohjeita PDFExtractorille.
Returns
ResultContainer -objekti, joka sisältää ulosteen tuloksen.