Sends a single document to the Google Cloud Services (GCS) Document AI v1beta2 API for synchronous (immediate) processing. Returns a response object containing the OCRed text and additional information, including table-related data.
path to a single pdf or image file
a GCS project id
a two-letter region code ("eu" or "us")
An access token generated by
This function accesses a different API endpoint than the main
dai_sync() function, one that has less language support, but
returns table data in addition to parsed text (which
currently does not). This function may be deprecated if/when the v1
endpoint incorporates table extraction. Use of this service requires
a GCS access token and some configuration of the .Renviron file; see
vignettes for details. Input files can be in either .pdf, .bmp, .gif,
.jpeg, .jpg, .png, or .tiff format. PDFs can be up to five pages long.
Extract the text from the response object with
text_from_dai_response(). Inspect the entire response object
a HTTP response object
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.