6ber6ou's avatar

PDF Viewer

Hi all.

I am looking for a PDF Viewer Pacakge. I want embed the PDF in my site

0 likes
8 replies
mehany's avatar

@6ber6ou I find it better to just use an iframe and let the user use their favorite PDF viewer.

Advantages:

1- User will use the PDF viewer they are used to.
2- 0 dev time.
3- Much cleaner code! light on Blade

possible disadvantages:

1- For whatever reason the browser does not have a PDF viewer.

1 like
computer-logix's avatar

I was looking at goodnesskay's https://github.com/goodnesskay/LARAVEL-PDF-VIEWER and it's exactly what I needed.

I successfully run composer require goodnesskay/laravelpdfviewer and add Goodnesskay\LaravelPdfViewer\LaravelPdfViewerServiceProvider::class, to my config/app.php file providers section.

Here is when the problem happens:

richardb@richardb-w MINGW64 /d/sandbox.git/sandbox3.dev (develop)
$ php artisan vendor:publish --provider="Goodnesskay\LaravelPdfViewer\LaravelPdfViewerServiceProvider::class"


  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Class 'Goodnesskay\LaravelPdfViewer\LaravelPdfViewerServiceProvider' not found

This is happening on Laravel 5.4. Any ideas?

abdulrehman25's avatar

Remove Goodnesskay\LaravelPdfViewer\LaravelPdfViewerServiceProvider::class, from config/app.php, providers key,

Copy folder laraview

from: vendor\goodnesskay\laravelpdfviewer

to: public

Copy pdf file (whatever), ex test.pdf, to public folder

Test, open Browser http://xxx.xxx.xx/laraview/#../test.pdf

Please or to participate in this conversation.