Hello,
I am new on R and I have an OCR batch macro, using R, which read PDF's and convert them to tabular format. My issue is reading Cyrillic, Chinese, Japanese, Turkish letters.
Could someone help me to amend the code in order to read all types of symbols correctly?
Is a solution to use unicode for reading?
cond.install <- function(package.name){
options(repos = "http://cran.rstudio.com") #set repo
#check for package in library, if package is missing install
if(package.name%in%rownames(installed.packages())==FALSE) {
install.packages(package.name)}else{require(package.name, character.only = TRUE)}}
cond.install("pdftools")
cond.install("tesseract")
file <- "C:\\Users\\PDF\\First file.pdf"
pngfile <- pdftools::pdf_convert(file,dpi = 200)
text <- tesseract::ocr(pngfile)
write.Alteryx(text, 1)
write.Alteryx(file,2)
Thank you in advance,