定制 klongchu/laravelpdfviewer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

klongchu/laravelpdfviewer

最新稳定版本:1.0.0

Composer 安装命令:

composer require klongchu/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 klongchu/laravelpdfviewer

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

Klongchu\LaravelPdfViewer\LaravelPdfViewerServiceProvider::class,

Configure

Run this in your terminal:

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

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 51
  • 开发语言: Java

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-09