TextDevice.Encoding

TextDevice.Encoding-egenskap

Hämtar eller ställer in kodningen av extraherad text.

public Encoding Encoding { get; set; }

Exempel

Exemplet visar hur man representerar extraherad text i UTF-8-kodning.

Document doc = new Document(inFile);
string extractedText;

// create text device
TextDevice device = new TextDevice(Encoding.UTF8);

// convert the page and save text to the stream
device.Process(doc.Pages[1], outFile);

// use the extracted text
extractedText = File.ReadAllText(outFile, Encoding.UTF8);

Se Även