ropensci / pdftools

Text Extraction, Rendering and Converting of PDF Documents
https://docs.ropensci.org/pdftools
Other
518 stars 69 forks source link

text to pdf? #10

Closed Jeet1994 closed 8 years ago

Jeet1994 commented 8 years ago

I have the following function:

FunctionFun <- function(.csv)
{
  sink('Dimension.txt')
  csv <- read.csv(.csv)
  dimValue <- dim(csv)
  print("The dimension of the dataset is:")
  print(dimValue)
  return(dimValue)
  sink('Dimension.txt', append=TRUE)
}

I want to write another function that would convert the Dimension.txt to Dimension.pdf. Can I achieve this using pdftools?

jeroen commented 8 years ago

The pdftools package is for reading pdf. To write PDF files you need to use something like knitr/markdown/latex, or the pdf graphics device.

jeroen commented 8 years ago

Crosspost @ http://stackoverflow.com/questions/39724362/text-to-pdf-in-r.

Jeet1994 commented 8 years ago

Thank you. I will have a look at those you mentioned.