I am trying to mine text from a bunch of PDFs, but when I read them into R using pdf_text
from the pdftools
package, the text it produces is just strange and nothing like what is actually on the PDF file. Onedrive link: https://1drv.ms/b/s!AlTtlgN0WIa3s2qeq4yrv9fUu-Z6 .
Here's the sample code I use:
library(pdftools)
pdf1 <- pdf_text("https://dl.dropboxusercontent.com/s/308gpdijvnw18mf/2018REQ118030709.pdf?dl=0")
pdf1
## c("(’-*)&&$(&’-’’’’)*,&’$)’&/.\r\n itiCHMON&\\ 4Q\\a WN BQKPUWVL
##FQZOQVQI )’(/ 7QZ[\\ 9ITN BMIT
##6[\\I\\M DI‘ 3QTT\r\n 5Q^Q[QWV WN 4WTTMK\\QWV[\r\n
##FE 8_h -10+0\r\n HYSX]_^T’ L7 -.-1,(10+0
##3QTT >]UJMZ (/’*’.’0\r\n IBKHHO F7L;HI ?D9
##@TMI[M ZMKWZL 3QTT >]UJMZ QV UMUW [MK\\QWV WN KPMKS\r\n ,0+, L7BB;O H:\r\n
##H?9>CED: L7 -.---(0/+1
##IVL QVKT]LM QV ITT WVTQVM JIVSQVO \\ZIV[IK\\QWV[\r\n
##@ZWXMZ\\a :VNWZUI\\QWV
##DI‘ :VNWZUI\\QWV\r\n JQh OUQb5
##-+,3 J_dQ\\ 7TZecdUT 7^^eQ\\ 9XQbWUc5
##!,+’/+/)++\r\n 3QTT >]UJMZ1 .
##.. <truncated>
I am pretty new to R, any idea what I may be doing wrong? Please, any help with this would be appreciated.
Edit: I have replaced the url with a working url and I have also included the results that I am getting.