ropensci / pdftools

Text Extraction, Rendering and Converting of PDF Documents
https://docs.ropensci.org/pdftools
Other
513 stars 69 forks source link

Pdf_data() does not find the right version of poppler, while poppler_config() does #82

Closed Cdk29 closed 3 years ago

Cdk29 commented 3 years ago

I think it is self explanatory :

> pdftools::pdf_data("~/Bureau/Abrams, M T et al 2010.pdf")
Error in poppler_pdf_data(loadfile(pdf), opw, upw) : 
  pdf_data() requires poppler >= 0.71. You have 0.41.0
> pdftools::poppler_config()
$version
[1] "0.86.1"

$can_render
[1] TRUE

$has_pdf_data
[1] FALSE

$supported_image_formats
[1] "png"  "jpeg" "jpg"  "tiff" "pnm" 
Cdk29 commented 3 years ago

Solution : installing pdftools from CRAN solved the issue. I initially installed it using the following :

install.packages("~/Bureau/pdftools/", repos = NULL, type = "source")

After I cloned the github repository to work on it.

jeroen commented 3 years ago

I think you have 2 poppler installations on your machine. Either that your you upgraded poppler after installing the R package, and you need to reinstall.

Cdk29 commented 3 years ago

No I think it was just my way of installing it that was not adequate somehow.

I tried reinstill and the issue persisted. But doing Rcpp::compile(), sudo R CMD build, and install.package() on the tar worked. I think the issue can be closed.