ropensci / pdftools

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

pdf_combine: the system cannot find the file specified #84

Closed arndtupb closed 4 years ago

arndtupb commented 4 years ago

Applying the pdf_combine function pdf_combine(list.files(path = "C:/Users/user/Desktop/input", pattern= ".pdf"), output = file.path("C:/Users/user/Desktop/output", paste("Combined.pdf"))) leaves me with the following error message:
Error in normalizePath(path.expand(path), winslash, mustWork) : path[1]="ABC.pdf": The system cannot find the file specified

file.exists("C:/Users/user/Desktop/input/ABC.pdf") [1] TRUE & pdf_length("C:/Users/user/Desktop/input/ABC.pdf") [1] 12

For me, this indicates an issue with the pdf_combine function.


version
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 4
minor 0.3
year 2020
month 10
day 10
svn rev 79318
language R
version.string R version 4.0.3 (2020-10-10) nickname Bunny-Wunnies Freak Out

jeroen commented 4 years ago

This is not related to pdftools, but if you add full.names = TRUE to list.files() then you get the full file path.