承接 xililo/yii2-pdfjs 相关项目开发

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

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

xililo/yii2-pdfjs

Composer 安装命令:

composer require xililo/yii2-pdfjs

包简介

Previewer PDF File with PDF.js for Yii2 with CORS unrestricted

README 文档

README

Previewer PDF File with PDF.js for Yii2

Latest Stable Version Total Downloads Latest Stable Release Date Quality Score Build Status License PHP Version Require

Yii2 PDF.js uses PDF.js
Demo: https://mozilla.github.io/pdf.js/web/viewer.html

Table of Contents

Instalation

Package is available on Packagist, you can install it using Composer.

composer require xililo/yii2-pdfjs 'dev-master'

or add to the require section of your composer.json file.

'xililo/yii2-pdfjs': 'dev-master'

Dependencies

Usage

Setup Module

...
'modules'=>[
  'pdfjs' => [
       'class' => \xililo\pdfjs\Module::class,
   ],
],
...

Views

Basic Usage

echo \xililo\pdfjs\PdfJs::widget([
    'url' => '@web/uploads/dummy.pdf',
]);

Direct Url with Full Toolbar Section

echo Url::to(["/pdfjs", 'file' => Url::to('@web/uploads/dummy.pdf', true)], true);

Custom Attribute

echo \xililo\pdfjs\PdfJs::widget([
    'url' => '@web/uploads/dummy.pdf',
    'options' => [
        'style' => [
            'width' => '100%',
            'height' => '500px',
        ],
    ],
]);

Disable Toolbar Section

echo \xililo\pdfjs\PdfJs::widget([
    'url' => '@web/uploads/dummy.pdf',
    'sections' => [
        'toolbarContainer' => false,
    ],
]);

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 5
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-22