tm readPDF: Error in file(con, “r”) : cannot open the connection

后端 未结 1 832
[愿得一人]
[愿得一人] 2020-12-22 02:00

I have tried the example code recommended in the tm::readPDF documentation:

library(tm)

if(all(file.exists(Sys.which(c(\"pdfinfo\", \"pdftotext\"))))) {
            


        
相关标签:
1条回答
  • 2020-12-22 02:20

    Did some debugging and see it fails in tm:::pdfinfo():

    status <- system2("pdfinfo", shQuote(normalizePath(file)), 
            stdout = outfile)
    

    This command doesn't create the outfile. According to Redirect system2 stdout to a file on windows this is a bug!

    0 讨论(0)
提交回复
热议问题