library(readtext)
data_dir <- system.file("E:/project_refrences", package = "readtext")
rt7 <- readtext(paste0(data_dir, "*.pdf"), docvarsfrom = "filenames",
docvarnames = c("document", "language"))
I tried and getting this Error while processing multiple pdf files:
## PDF error: xref num 65 not found but needed, try to reconstruct<0a>
## PDF error: Invalid Font Weight
## PDF error: Invalid Font Weight
## PDF error: Invalid Font Weight
## PDF error: Invalid Font Weight
## PDF error: Invalid Font Weight
I also tried by applying for loop:
pdf <- Sys.glob("*.pdf")
for(i in pdf){
rt <- readtext((i), docvarfrom = "filenames", docvarnames = c("document", "language"))}
but getting same above mentioned error.
How can I fix this error or work around it?