R/pdf.R

# pdf_from_abc_html <- function(html, pdf_path, id = attr(html, "id"), crop = TRUE) {
#   html_path <- tempfile(fileext = ".html")
#   htmltools::save_html(html, html_path)
#   webshot::webshot(url = html_path,
#                    file = pdf_path,
#                    selector = paste0("#", id))
#   if (crop) knitr::plot_crop(pdf_path)
# }
pmcharrison/abcR documentation built on Sept. 21, 2019, 5:40 p.m.