Git Product home page Git Product logo

laravel-pdf-viewer's Introduction

Laravel PDF VIEWER

Latest Stable Version License Build Status

This package is meant to help with viewing portable document file(PDF) on the web seamlessly when developing with Laravel. The package makes use of ViewerJS

Requirement

Installation

To install into your project, run the command below in your terminal.

composer require goodnesskay/laravelpdfviewer

Once the package is done being installed, register the service provider. Open config/app.php and add the following to the providers key.

Goodnesskay\LaravelPdfViewer\LaravelPdfViewerServiceProvider::class,

Configure

Run this in your terminal:

php artisan vendor:publish --provider="Goodnesskay\LaravelPdfViewer\LaravelPdfViewerServiceProvider" 

It will publish a folder named laraview to the root folder of your project.

How it Works

Simple!!! After installations and configurations have been carried out successfully, add the code below to your html file

{{ asset('/laraview/#../folder-name/the-pdf-file.pdf') }}

It should look like this:

<iframe src ="{{ asset('/laraview/#../pdf/test.pdf') }}" width="1000px" height="600px"></iframe>

Then, you should have something like this:

Goodness Kayode Laravel-pdfviewer

Note:

After #../ in {{ asset('/laraview/#../folder-name/the-pdf-file.pdf') }}, what should follow is the folder name of the pdf files in the public folder then, the pdf file name can follow.

Contribute

You can fork this package, contribute and submit a pull request. I will really love it.

You want to appreciate me?

You can appreciate me by starring this repository and follow me on Github , twitter and subscribe to my Youtube Channel!

I love you like mad.

Goodness Kayode | Pusher of Codes

License

MIT License (MIT).

laravel-pdf-viewer's People

Contributors

goodnesskay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.