You are here

You are here

Download Document - OCR Text

For many documents in SpringCM, such as office documents and PDF's, SpringCM will use optical character recognition to extract the content of the document as plain text and use it to make the document searchable.

The OCR'd text of a document may be downloaded via the API using the DocumentGetExtractedText method.

Vertical Tabs

c#
string documentId = "<Document Id retrieved by other method calls>";
string localPath = "<Local file system path and file name for downloaded file.  Should have .txt extension.>";
 
string documentAsText = springCMService.DocumentGetExtractedText(token, documentId);
File.WriteAllText(localPath,documentAsText);
java
String documentId = "<Document Id retrieved by other method calls>";
String localPath = "<Local file system path and file name for downloaded file.  Should have .txt extension.>";
 
String documentAsText = springCMService.documentGetExtractedText(token, documentId);
FileWriter file = new FileWriter(localPath);
try 
{
	file.write(documentAsText);
} 
finally 
{
	file.close();
}