2017 © Pedro Peláez
 

yii2-extension yii2-pdfjs

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

image

yii2assets/yii2-pdfjs

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

  • Friday, July 22, 2016
  • by dixonsatit
  • Repository
  • 3 Watchers
  • 10 Stars
  • 7,737 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 3 Open issues
  • 8 Versions
  • 20 % Grown

The README.md

Yii2 PDFJS

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock, (*1)

Yii2 PDFJS bundle of PDF.js plugin. PDF.js Portable Document Format (PDF) viewer., (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer require --prefer-dist yii2assets/yii2-pdfjs ">=1.0"

or add, (*5)

"yii2assets/yii2-pdfjs": ">=1.0"

to the require section of your composer.json file., (*6)

Module Setup

The extension has been created as a module to enable access preview pdf file. you must add the module to your configuration file., (*7)

//....

'modules'=>[
  'pdfjs' => [
       'class' => '\yii2assets\pdfjs\Module',
   ],
],

//...

Usage

Once the extension is installed, simply use it in your code by :, (*8)



= \yii2assets\pdfjs\PdfJs::widget([
  'url'=> Url::base().'/downloads/manualStart_up.pdf'
]); ?>

, (*9)

Using a yii2-pdfjs widget inside a modal dialog.

 '

Hello world

', 'toggleButton' => ['label' => 'click me'], ]); echo \yii2assets\pdfjs\PdfJs::widget([ 'url' => Url::base().'/downloads/manualStart_up.pdf' ]); Modal::end(); ?>

, (*10)

Using a yii2-pdfjs widget fullscreen viewer

http://app-url/index.php?r=pdfjs&file=download/manualStart_up.pdf

, (*11)

Config Width & Height



= \yii2assets\pdfjs\PdfJs::widget([
  'width'=>'100%',
  'height'=> '500px',
  'url'=> Url::base().'/downloads/pdfjs.pdf'
]);
?>

Config disable toolbar buttons



= \yii2assets\pdfjs\PdfJs::widget([
  'url'=> Url::base().'/downloads/pdfjs.pdf',
  'buttons'=>[
    'presentationMode' => false,
    'openFile' => false,
    'print' => true,
    'download' => true,
    'viewBookmark' => false,
    'secondaryToolbarToggle' => false
  ]
]);
?>

, (*12)

Add Watermark text

//....

'modules'=>[
  'pdfjs' => [
       'class' => '\yii2assets\pdfjs\Module',
       'waterMark'=>[
         'text'=>' Yii2 PDF.JS',
         'color'=> 'red',
         'alpha'=>'0.3'
       ]
   ],
],

//...

, (*13)

The Versions

22/07 2016

dev-master

9999999-dev

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

  Sources   Download

Apache-2.0

The Requires

 

by sathit seethaphon

extension yii2 pdf pdfjs pdf reader

22/07 2016

dev-develop

dev-develop

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

  Sources   Download

Apache-2.0

The Requires

 

by sathit seethaphon

extension yii2 pdf pdfjs pdf reader

21/07 2016

1.0.2

1.0.2.0

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

  Sources   Download

Apache-2.0

The Requires

 

by sathit seethaphon

extension yii2 pdf pdfjs pdf reader

20/07 2016

1.0.1

1.0.1.0

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

  Sources   Download

Apache-2.0

The Requires

 

by sathit seethaphon

extension yii2 pdf pdfjs pdf reader

17/07 2016

1.0

1.0.0.0

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

  Sources   Download

Apache-2.0

The Requires

 

by sathit seethaphon

extension yii2 pdf pdfjs pdf reader

17/07 2016

0.1.2

0.1.2.0

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

  Sources   Download

Apache-2.0

The Requires

 

by sathit seethaphon

extension yii2 pdf pdfjs pdf reader

17/07 2016

0.1.1

0.1.1.0

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

  Sources   Download

Apache-2.0

The Requires

 

by sathit seethaphon

extension yii2 pdf pdfjs pdf reader

17/07 2016

0.1.0

0.1.0.0

Yii2 Extension pdf.js Portable Document Format (PDF) viewer

  Sources   Download

Apache-2.0

The Requires

 

by sathit seethaphon

extension yii2 pdf pdfjs pdf reader