powered by
Extracts the text OCRed by Document AI (DAI)
get_text( object, type = "sync", save_to_file = FALSE, dest_dir = getwd(), outfile_stem = NULL )
a string (if save_to_file = FALSE)
save_to_file = FALSE
either a HTTP response object from dai_sync() or the path to a JSON file from dai_async().
dai_sync()
dai_async()
one of "sync" or "async", depending on the function used to process the original document.
boolean; whether to save the text as a .txt file
folder path for the .txt output file if save_to_file = TRUE
save_to_file = TRUE
string to form the stem of the .txt output file
if (FALSE) { text <- get_text(dai_sync("file.pdf")) text <- get_text("file.json", type = "async", save_to_file = TRUE) }
Run the code above in your browser using DataLab