IRPCScanningAndOCR.OCRUploadedFile
Vault API / standard write session
Starts an OCR job that converts the file of a stateless upload to a searchable PDF.
| Service | Scanning and OCR MFiles.IRPCScanningAndOCR |
|---|---|
| gRPC method | /MFiles.IRPCScanningAndOCR/OCRUploadedFile |
| HTTP (mf-http-grpc) | POST /grpc/v1/ocruploaded-file |
| Request | OCRUploadedFileRequest |
| Response | OCRUploadedFileResponse |
| 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 | no |
| Streaming | none (unary) |
Remarks
- Not available on current servers: the call fails with "Not implemented.". Use OCROperation_BeginAfterUpload instead.
- Takes the
file_refof an upload ended with FileUploadEnd. OnlyOCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_PDFandOCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_ARCHIVE_PDFare accepted. - Follow the job with GetOCRUploadedFileStatus.
Request: OCRUploadedFileRequest
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 |
|---|---|---|
file_ref | string | The file_ref of a stateless upload ended with FileUploadEnd, to be used as input for the OCR job. |
source_file_extension | string | The filename extension (without dot) of the source file. Required, as a file_ref has no file name. |
type | OCROperationType | OCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_PDF or OCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_ARCHIVE_PDF; other types fail.Values: OCROPERATION_TYPE_NONE (0), OCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_PDF (1), OCROPERATION_TYPE_RECOGNIZE_SPECIFIC_BLOCKS (2), OCROPERATION_TYPE_RECOGNIZE_ANY_BLOCKS (3), OCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_PDF_AND_RECOGNIZE_SPECIFIC_BLOCKS (4), OCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_PDF_AND_RECOGNIZE_ANY_BLOCKS (5), OCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_ARCHIVE_PDF (6), OCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_ARCHIVE_PDF_AND_RECOGNIZE_SPECIFIC_BLOCKS (7), OCROPERATION_TYPE_CONVERT_TO_SEARCHABLE_ARCHIVE_PDF_AND_RECOGNIZE_ANY_BLOCKS (8). |
options | OCROptions | OCR options to be used for this job. If unset, default settings are used. |
options.languages[] | repeated OCRLanguageType | Languages/character sets/dictionaries to be used as recognition hints. Can be unset. |
options.ocr_automatic_language_detection | bool | True if the OCR automatic language detection is to be used. |
Response: OCRUploadedFileResponse
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 |
|---|---|---|
job_id | string | The ID of the job, for GetOCRUploadedFileStatus. |
Related methods
- OCROperation_BeginAfterUpload -- Starts an OCR job on a file that the caller uploaded with UploadTempFile.
- IRPCFileTransfer.FileUploadEnd -- Completes an upload in blocks. Binds the content to no object; use FileUploadAttach or AddObjectWithFiles for that.
- GetOCRUploadedFileStatus -- Gets the state of an OCR job started with OCRUploadedFile and, when it has completed, its result as a
file_ref. Optionally requests the cancellation of the job.