title: save html from data.frames to pdf using wkhtmltopdf or Markdown
body: <p>I have a df with a column <code>htmltext</code> containing html text that I would like to print (as a batch if possible) as single PDFs with <code>doc_id</code> as filename.</p>
  
  <p>Can I do that directly within R?</p>
  
  <p>I thought about something like </p>
  
  <pre><code>&gt; system("wkhtmltopdf --javascript-delay 1 in.html out.pdf") 
  </code></pre>
  
  <p>how can I implement that in R?
  or is there another easy way to to so using markdown for example. </p>
  
  <pre><code># df
  doc_id &lt;- c("doc1","doc2","doc3")
  htmltext &lt;- c("&lt;b&gt;good morning&lt;/b&gt;","&lt;b&gt;This text is bold&lt;/b&gt;","&lt;b&gt;good evening&lt;/b&gt;")
  df &lt;- data.frame(doc_id,htmltext, stringsAsFactors = FALSE)
  
  # save htmltext single pdfs with doc_id as filename
  filenames = filenames = df$doc_id
  ...?
  </code></pre>