vipin93's avatar
Level 13

How can i access PDF file?

I'm trying to use https://github.com/spatie/pdf-to-text problem now I'm successfully able to upload file but I can not retrieve every time I'm getting error

2017-09-26 17:53:10] local.ERROR: could not find pdf E:\laragon\www\precilyl\storage.\.3KHzY2cOUkWyAuf0ziwIxqkS1n62QmNtaetzMwWv.pdf {"exception":"[object] (Spatie\\PdfToText\\Exceptions\\PdfNotFound(code: 0): could not find pdf 

here is my code

// $return = Storage::disk('local')->put('file.pdf', $request->filename);

    $filename = $request->file('filename')->store('');
    // $path = storage_path() . '\' . $name;
    // $file = Storage::get('app/'.$name);
    $return = \Spatie\PdfToText\Pdf::getText($filename, '/mingw64/bin/pdftotext');

     return $return;

0 likes
0 replies

Please or to participate in this conversation.