IRPCScanningAndOCR.OCROperation_EndWithDownload

View as Markdown

Vault API / standard write session returns metadata structure version

Ends an OCR job and returns its results: the recognized texts and a download of the PDF.

ServiceScanning and OCR MFiles.IRPCScanningAndOCR
gRPC method/MFiles.IRPCScanningAndOCR/OCROperation_EndWithDownload
HTTP (mf-http-grpc)POST /grpc/v1/ocroperation_-end-with-download
RequestOCROperation_EndWithDownloadRequest
ResponseOCROperation_EndWithDownloadResponse
Book and levelVault API, standard
Kindwrite
SessionRequired: the session ID from LogIn in the mfiles-session-id-bin metadata.
Idempotentno
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

Request: OCROperation_EndWithDownloadRequest

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
background_op_iduint32The ID of the job.

Response: OCROperation_EndWithDownloadResponse

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
page_results[]repeated OCRPageResultThe recognized areas and their texts, per page. Empty for the types that only produce a PDF.
page_results[].numberuint32Page number of this page.
page_results[].blocks[]repeated OCRBlockResultAn array of OCR block results.
page_results[].blocks[].idint32Id of the OCR block. Negative value if there was no request block.
page_results[].blocks[].dimension_unitOCRBlockDimUnitTypeDefines 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[].leftuint32Distance from the left of the image.
page_results[].blocks[].topuint32Distance from the top of the image.
page_results[].blocks[].widthuint32Width of the block rectangle.
page_results[].blocks[].heightuint32Height of the block rectangle.
page_results[].blocks[].confidenceint32Confidence level (0 = most confident, 255 = least confident).
page_results[].blocks[].pageuint32One-based number of the page on which this result was recognized. 0 means no recognition.
page_results[].blocks[].valueTypedValueThe recognized value.
download_sessionint32The download ID of the resulting PDF.
download_file_sizeint64The size of the resulting PDF in bytes; 0 if none.