title: How do I pull in multiple pdfs into pdf_convert using r and pdftools package?
body: <p>How do I import multiple pdf files into the <code>pdf_convert</code> command of the <code>pdftools</code> package?</p>
  
  <p>I have a directory that with multiple pdf files.  I'm using the <code>pdftools</code> package with the <code>pdf_convert</code> command to render jpegs from the pdf document.  However, there is no <code>pattern</code> command to set a pattern to the documents.</p>
  
  <p>I've tried:</p>
  
  <pre><code>for(i in length(dir(folder))){
     pdf_convert("C:/folder/*.pdf", format = "jpeg")
  }
  </code></pre>
  
  <p>However that throws an error that says:</p>
  
  <p><code>Error in normaizePath(path.expand(path), winslash, mustWork) :</code>
  <code>path[1]="C:/folder/*.pdf: The filename, director name, or volume label syntax is incorrect</code></p>
  
  <p>When I don't use the <code>*.pdf</code> and instead use the actual file name, it works.  </p>
  
  <p>How do I get the command to read multiple files? </p>
  
  <p>I'm sorry I don't have a reproducible example.  I'm not sure how I would post a directory with multiple pdf files and access to it on SO.</p>