title: Reading pdf with TM package
body: <p>I am trying to read pdf files with the TM package. I have gone through succesfully in most of the attempts, but one. I have several folders with hundreds of documents each. I have read all of them but one. The problem is that the pdfs in that specific folder have a sequence of images on the bottom of the first page that prevents me from reading them. I get the following error:</p>
  
  <pre><code>Error in strptime(d, fmt) : input string is too long
  </code></pre>
  
  <p>If I remove the first page, I manage to read them. I could do it without much loss of relevant information, but it is too much work. </p>
  
  <p>I try with xpdf and ghoststring, but both give me the same error.</p>
  
  <p>My code is as following:</p>
  
  <pre><code>library(rvest)
  library(tm)
  url&lt;-paste0("http://www.tjrj.jus.br/search?q=acidente+de+transito+crianca+atropelamento&amp;btnG=Pesquisar&amp;processType=cnj&amp;site=juris&amp;client=juris&amp;output=xml_no_dtd&amp;proxystylesheet=juris&amp;entqrm=0&amp;oe=UTF-8&amp;ie=UTF-8&amp;ud=1&amp;filter=0&amp;getfields=*&amp;partialfields=(ctd:1)&amp;exclude_apps=1&amp;ulang=en&amp;lr=lang_pt&amp;sort=date:D:S:d1&amp;as_q=+&amp;access=p&amp;entqr=3&amp;start=",seq(0,462,10))
  
  css&lt;-sprintf(".margin-top-10:nth-child(%.d) .outros .featured",1:10)
  
  for (j in 1:1){ # There 47 pages, but I only put one here 
  for (i in 1:10){ # there are 10 files per page.
  a&lt;-html_node(css=css[i]) %&gt;% 
  html_attr("href")
  download.file(a,paste0("doc",j,i,".pdf"))
  }
  }
  
  files &lt;- list.files(pattern = "pdf$")
  Rpdf &lt;- readPDF(control = list(text = "-layout"))
  docs &lt;- Corpus(URISource(files,encoding="UTF-8"),readerControl = list(reader = Rpdf,language="portuguese"))
  </code></pre>
  
  <p>Does someone have a suggestion? I use a Mac.</p>