R/include_pdf.R

Defines functions include_pdf

Documented in include_pdf

#' Include PDF in markdown documents
#'
#' Insert PDF files in markdown documents
#'
#' @param file file path from pdf file.
#' @param width width preview file.
#' @param height height preview file.
#'
#' @return html code for markdown
#' 
#' @export
#'   


include_pdf <- function(file
                        , width = "100%"
                        , height = "600"
                        ) {
  
  paste0('<embed src= "', file, '" height="', height, '" width="', width, '" alt="pdf" pluginspage="http://www.adobe.com/products/acrobat/readstep2.html">') %>% 
    knitr::asis_output()
  
}

Try the inti package in your browser

Any scripts or data that you put into this service are public.

inti documentation built on Oct. 27, 2023, 9:06 a.m.