IRPCScanningAndOCR.OCROperation_End
Vault API / standard write session returns metadata structure version
Ends an OCR job started with OCROperation_Begin and replaces the document's file with the resulting PDF.
| Service | Scanning and OCR MFiles.IRPCScanningAndOCR |
|---|---|
| gRPC method | /MFiles.IRPCScanningAndOCR/OCROperation_End |
| HTTP (mf-http-grpc) | POST /grpc/v1/ocroperation_-end |
| Request | OCROperation_EndRequest |
| Response | OCROperation_EndResponse |
| Book and level | Vault API, standard |
| Kind | write |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | no |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Remarks
- Only for jobs started with OCROperation_Begin; other jobs fail with "OCR processing has not been started.".
- For the types that produce a PDF, the file in the checked-out version is replaced with the
PDF and its extension changes to
pdf. Check the document in to save the change. - The job is released; the ID cannot be used again. If the job failed, the call fails with the job's error.
Request: OCROperation_EndRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
background_op_id | uint32 | The ID of the job. |
Response: OCROperation_EndResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
page_results[] | repeated OCRPageResult | The recognized areas and their texts, per page. Empty if the type did not recognize areas. |
page_results[].number | uint32 | Page number of this page. |
page_results[].blocks[] | repeated OCRBlockResult | An array of OCR block results. |
page_results[].blocks[].id | int32 | Id of the OCR block. Negative value if there was no request block. |
page_results[].blocks[].dimension_unit | OCRBlockDimUnitType | Defines the unit of the block rectangle dimensions. Default is pixels.Values: OCRBLOCK_DIM_UNIT_TYPE_PIXELS (0), OCRBLOCK_DIM_UNIT_TYPE_MILLIMETERS_X10 (1), OCRBLOCK_DIM_UNIT_TYPE_INCHES_X100 (2). |
page_results[].blocks[].left | uint32 | Distance from the left of the image. |
page_results[].blocks[].top | uint32 | Distance from the top of the image. |
page_results[].blocks[].width | uint32 | Width of the block rectangle. |
page_results[].blocks[].height | uint32 | Height of the block rectangle. |
page_results[].blocks[].confidence | int32 | Confidence level (0 = most confident, 255 = least confident). |
page_results[].blocks[].page | uint32 | One-based number of the page on which this result was recognized. 0 means no recognition. |
page_results[].blocks[].value | TypedValue | The recognized value. |
Related methods
- OCROperation_Begin -- Starts an OCR job on a file of a document that the caller has checked out.
- OCROperation_Status -- Gets the progress of an OCR job, and optionally cancels it.
- OCROperation_BeginAfterUpload -- Starts an OCR job on a file that the caller uploaded with UploadTempFile.
- OCROperation_EndWithDownload -- Ends an OCR job and returns its results: the recognized texts and a download of the PDF.