ropensci / pdftools

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

`PDF_data` not working #47

Closed muschellij2 closed 5 years ago

muschellij2 commented 5 years ago

I am getting an error with the poppler version though it is up to date:

library(pdftools)
pdf_data("YG-Archive-DatingSocialMediaInternal-090818.pdf")
#> Error in poppler_pdf_data(loadfile(pdf), opw, upw): This feature requires poppler >= 0.63. You have 0.71.0
poppler_config()
#> $version
#> [1] "0.71.0"
#> 
#> $can_render
#> [1] TRUE
#> 
#> $supported_image_formats
#> [1] "png"  "jpeg" "jpg"  "tiff" "pnm"
devtools::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.5.1 (2018-07-02)
#>  os       macOS Sierra 10.12.6        
#>  system   x86_64, darwin15.6.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       America/New_York            
#>  date     2018-11-30                  
#> 
#> ─ Packages ──────────────────────────────────────────────────────────────
#>  package     * version    date       lib source                         
#>  assertthat    0.2.0      2017-04-11 [1] CRAN (R 3.5.0)                 
#>  backports     1.1.2      2017-12-13 [1] CRAN (R 3.5.0)                 
#>  base64enc     0.1-3      2015-07-28 [1] CRAN (R 3.5.0)                 
#>  callr         3.0.0      2018-08-24 [1] CRAN (R 3.5.0)                 
#>  cli           1.0.1      2018-09-25 [1] CRAN (R 3.5.0)                 
#>  crayon        1.3.4      2017-09-16 [1] CRAN (R 3.5.0)                 
#>  debugme       1.1.0      2017-10-22 [1] CRAN (R 3.5.0)                 
#>  desc          1.2.0      2018-10-06 [1] local                          
#>  devtools      2.0.1      2018-10-26 [1] CRAN (R 3.5.1)                 
#>  digest        0.6.18     2018-10-10 [1] CRAN (R 3.5.0)                 
#>  evaluate      0.12       2018-10-09 [1] CRAN (R 3.5.0)                 
#>  fs            1.2.6      2018-08-23 [1] CRAN (R 3.5.0)                 
#>  glue          1.3.0      2018-07-17 [1] CRAN (R 3.5.0)                 
#>  htmltools     0.3.6      2017-04-28 [1] CRAN (R 3.5.0)                 
#>  knitr         1.20       2018-09-21 [1] Github (yihui/knitr@0da648b)   
#>  magrittr      1.5        2014-11-22 [1] CRAN (R 3.5.0)                 
#>  memoise       1.1.0      2017-04-21 [1] CRAN (R 3.5.0)                 
#>  pdftools    * 1.8        2018-05-27 [1] CRAN (R 3.5.1)                 
#>  pkgbuild      1.0.2      2018-10-16 [1] CRAN (R 3.5.0)                 
#>  pkgload       1.0.2      2018-10-29 [1] CRAN (R 3.5.1)                 
#>  prettyunits   1.0.2      2015-07-13 [1] CRAN (R 3.5.0)                 
#>  processx      3.2.0.9000 2018-11-13 [1] Github (r-lib/processx@8374340)
#>  ps            1.2.1      2018-11-06 [1] CRAN (R 3.5.0)                 
#>  R6            2.3.0      2018-10-04 [1] CRAN (R 3.5.0)                 
#>  Rcpp          1.0.0      2018-11-07 [1] CRAN (R 3.5.0)                 
#>  remotes       2.0.2      2018-10-30 [1] CRAN (R 3.5.0)                 
#>  rlang         0.3.0.1    2018-10-25 [1] CRAN (R 3.5.0)                 
#>  rmarkdown     1.10       2018-06-11 [1] CRAN (R 3.5.0)                 
#>  rprojroot     1.3-2      2018-01-03 [1] CRAN (R 3.5.0)                 
#>  sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 3.5.0)                 
#>  stringi       1.2.4      2018-07-20 [1] CRAN (R 3.5.0)                 
#>  stringr       1.3.1      2018-05-10 [1] CRAN (R 3.5.0)                 
#>  testthat      2.0.1      2018-10-13 [1] CRAN (R 3.5.0)                 
#>  usethis       1.4.0.9000 2018-11-13 [1] local                          
#>  withr         2.1.2      2018-03-15 [1] CRAN (R 3.5.0)                 
#>  yaml          2.2.0      2018-07-25 [1] CRAN (R 3.5.0)                 
#> 
#> [1] /Library/Frameworks/R.framework/Versions/3.5/Resources/library

Created on 2018-11-30 by the reprex package (v0.2.1)

muschellij2 commented 5 years ago

YG-Archive-DatingSocialMediaInternal-090818.pdf

muschellij2 commented 5 years ago

Duplicate of https://github.com/ropensci/pdftools/issues/44, but the error message is just not accurate though.

jeroen commented 5 years ago

This was finally fixed in libpoppler, and will be in the next version of pdftools.

jeroen commented 5 years ago

This is fixed in pdftool 2.0, which is now on CRAN.