TextDevice.ExtractionOptions
TextDevice.ExtractionOptions-egenskap
Hämtar eller ställer in alternativ för textutvinning.
public TextExtractionOptions ExtractionOptions { get; set; }
Exempel
Exemplet visar hur man extraherar text i rå ordning.
Document doc = new Document(inFile);
string extractedText;
// create text device
TextDevice device = new TextDevice(new TextExtractionOptions(TextExtractionOptions.TextFormattingMode.Raw));
// convert the page and save text to the stream
device.Process(doc.Pages[1], outFile);
// use the extracted text
extractedText = File.ReadAllText(outFile, Encoding.Unicode);
Se Även
- klass TextExtractionOptions
- klass TextDevice
- namnrymd Aspose.Pdf.Devices
- assembly Aspose.PDF