GetProcessedFile
Retrieves the text file from the ProcessFileAsync API. Caller should make sure the file is valid (as returned from the 1st API call) Caller should check the GetFileResult values
API | Description |
---|---|
GET api/GetProcessedFile?fileName={fileName} |
GetFile returns the text file generated from ProcessFileAsync. (use the filePath from that API to retrieve the file) Make sure the file exists. If it does not exist, you will get a valid HTTP return (HTTP 200), but the contents will indicate an error in the json. Most common cause of error: File is still being processed, or you used the wrong filePath See the GetFileResult information for details on the return data |
ProcessFileAsync
Used to submit a file for OCR and retrieve results later The file should be sent as part of the POST body as a form i.e. Multipart MIME encoded Use the appropriate OCR service API to retrieve the output file
API | Description |
---|---|
POST api/ProcessFileAsync?ocrLib={ocrLib} |
POST: Used to upload a file (Multipart MIME) for OCR. The file will be queued up for processing. Use GetProcessedFile to try to retrieve the resulting .txt file. The client will need to keep checking to see if the file is ready since processing time is variable. Query String parameter ocrLib is either 'std' (default) or 'pro' (?ocrLib={std|pro}) |
ProcessFile
Processes an image file (png or jpeg) and extracts the text data The file should be sent as part of the POST body as a form i.e. Multipart MIME encoded The data is returned in the HTTPResponse. The response is json or xml encoded, depending on the client request
API | Description |
---|---|
POST api/ProcessFile?ocrLib={ocrLib} |
POST: Used to upload file and receive text results in return data Query String parameter ocrLib is either 'std' (default) or 'pro' (?ocrLib={std|pro}) |