Posts

Showing posts with the label pdf

Installing PDFtotext in R

Installing PDFtotext in R I am trying to run the PDFtotext package in R. PDFtotext When I run these commands : library(tm) pdf=readPDF(control=list(text="-layout"))(elem=list(uri=uri), language="en", id="idi") I get this error : Error in system2("pdftotext", c(control$text, shQuote(x), "-"), stdout = TRUE) : "pdftotext" not found In addition: Warning message: running command "pdfinfo" "C:*****NCLR AR 2005.pdf" had status 127 Does anyone know what the problem might be? Sys.which("pdftotext") is "" ? I.e. the file is not found. Have you installed it? You may want to try the package pdftools as an alternative to read pdfs. – lukeA Apr 6 '16 at 14:38 Sys.which("pdftotext") "" pdftools ...

Laravel, trying to use helper to display PDF

Laravel, trying to use helper to display PDF I'm trying to display a PDF file I have in my storagereports folder inline in the browser. My file is: storagereportsReal_Estate_Test.pdf storagereportsReal_Estate_Test.pdf I have a helper file: appHelpershelpers.php appHelpershelpers.php I call the PDF from my blade with: {{viewReport($filepath, $ext, $filename)}} {{viewReport($filepath, $ext, $filename)}} where $filepath = storage_path().'reports'; $ext = "pdf"; $filename = "Real_Estate_Test"; In my helper file I have: <?php use Response; if (! function_exists('viewReport')) { function viewReport($filepath, $ext, $filename) { $filename.".".$ext, , 'inline'); $headers = [ 'Content-Type' => 'application/pdf', 'Content-Disposition' => 'inline; ' . $filepath."\".$filename.".".$ext, ]; return Response::make(File::get($file...