承接 davcpas1234/laravelpdfviewer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

davcpas1234/laravelpdfviewer

最新稳定版本:1.0.1

Composer 安装命令:

composer require davcpas1234/laravelpdfviewer

包简介

A Laravel Package for viewing PDF files or documents on Web App

README 文档

README

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 davcpas1234/laravelpdfviewer

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

Davcpas1234\LaravelPdfViewer\LaravelPdfViewerServiceProvider::class,

Configure

Run this in your terminal:

php artisan vendor:publish --provider="Davcpas1234\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.

License

MIT License (MIT).

统计信息

  • 总下载量: 13.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 24
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 24
  • Watchers: 1
  • Forks: 51
  • 开发语言: Java

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-31