Running examples in ‘tm-Ex.R’ failed
The error most likely occurred in:

> ### Name: readPDF
> ### Title: Read In a PDF Document
> ### Aliases: readPDF
> ### Keywords: file
> 
> ### ** Examples
> 
> uri <- sprintf("file://%s", system.file(file.path("doc", "tm.pdf"), package = "tm"))
> if(all(file.exists(Sys.which(c("pdfinfo", "pdftotext"))))) {
+     pdf <- readPDF(control = list(text = "-layout"))(elem = list(uri = uri),
+                                                      language = "en",
+                                                      id = "id1")
+     content(pdf)[1:13]
+ }
 [1] "                              Introduction to the tm Package"                                                 
 [2] "                                     Text Mining in R"                                                        
 [3] "                                                Ingo Feinerer"                                                
 [4] "                                                 July 3, 2015"                                                
 [5] ""                                                                                                             
 [6] ""                                                                                                             
 [7] "Introduction"                                                                                                 
 [8] "This vignette gives a short introduction to text mining in R utilizing the text mining framework provided by" 
 [9] "the tm package. We present methods for data import, corpus handling, preprocessing, metadata management,"     
[10] "and creation of term-document matrices. Our focus is on the main aspects of getting started with text mining" 
[11] "in R--an in-depth description of the text mining infrastructure offered by tm was published in the Journal of"
[12] "Statistical Software (Feinerer et al., 2008). An introductory article on text mining in R was published in R" 
[13] "News (Feinerer, 2008)."                                                                                       
> VCorpus(URISource(uri, mode = ""),
+         readerControl = list(reader = readPDF(engine = "ghostscript")))
Error in pdf_text(uri) : Ghostscript failed, with output:


Introduction to the tm Package

Text Mining in R

Ingo Feinerer

July 3, 2015

Introduction
This vignette gives a short introduction to text mining in R utilizing the text mining framework provided by
the tm package. We present methods for data import, corpus handling, preprocessing, metadata management,
and creation of term-document matrices. Our focus is on the main aspects of getting started with text mining
in R--an in-depth description of the text mining infrastructure offered by tm was published in the Journal of
Statistical Software (Feinerer et al., 2008). An introductory article on text mining in R was published in R
News (Feinerer, 2008).

Data Import
The main structure for managing documents in tm is a so-called Corpus, representing a collection of text
documents. A corpus is an abstract concept, and there can exist several implementations in parallel. The
default implementation is the so-called VCorpus (short for Volatile Corpus)
Calls: VCorpus -> mapply -> <Anonymous> -> <Anonymous> -> pdf_text
Execution halted