lesha724/yii2-document-viewer Π²ΠΈΠ΄ΠΆΠ΅Ρ‚ для отобраТСния online Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚ΠΎΠ² с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ google viewer ΠΈ microsoft document viewer

online document viewer ΒΆ

  1. Installation
  2. Usage
  3. Links

Π²ΠΈΠ΄ΠΆΠ΅Ρ‚ для отобраТСния online Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚ΠΎΠ² с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ google viewer, microsoft document viewer ΠΈ viewerJs

Installation ΒΆ

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist lesha724/yii2-document-viewer "*"

or add

"lesha724/yii2-document-viewer": "*"

to the require section of your composer.json file.

Usage ΒΆ

Once the extension is installed, simply use it in your code by :

<?= \lesha724\documentviewer\GoogleDocumentViewer::widget([
      'url'=>'http://example.com/test.doc',//url Π½Π° ваш Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚ 
      'width'=>'100%',
      'height'=>'100%',
      //https://geektimes.ru/post/111647/
      'embedded'=>true,
      'a'=>\lesha724\documentviewer\GoogleDocumentViewer::A_BI //A_V = 'v', A_GT= 'gt', A_BI = 'bi'
]); ?>

<?= \lesha724\documentviewer\MicrosoftDocumentViewer::widget([
        'url'=>'http://example.com/test.doc',//url Π½Π° ваш Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚
        'width'=>'100%',
        'height'=>'100%'
]); ?>

<?php
echo \lesha724\documentviewer\ViewerJsDocumentViewer::widget([
   'url' => '/README-viewer.odt', //url Π½Π° ваш Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚ ΠΈΠ»ΠΈ http://example.com/test.odt
   'width'=>'100%',
   'height'=>'100%',
]);?>

Links ΒΆ

  1. https://support.office.com/uk-ua/article/ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄-Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Ρ–Π²-Office-Π²-Π†Π½Ρ‚Π΅Ρ€Π½Π΅Ρ‚Ρ–-1cc2ea26-0f7b-41f7-8e0e-6461a104544e?ui=uk-UA&rs=uk-UA&ad=UA&fromAR=1
  2. https://products.office.com/en-us/office-online/view-office-documents-online
  3. https://support.office.com/uk-ua/article/ΠŸΡ–Π΄Ρ‚Ρ€ΠΈΠΌΠΊΠ°-Π±Ρ€Π°ΡƒΠ·Π΅Ρ€Ρ–Π²-Ρƒ-Π²Π΅Π±-ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠ°Ρ…-Office-Online-ad1303e0-a318-47aa-b409-d3a5eb44e452?ui=uk-UA&rs=uk-UA&ad=UA
  4. https://geektimes.ru/post/111647/
  5. http://viewerjs.org/
  6. http://viewerjs.org/examples/
  7. https://github.com/kogmbh/ViewerJS
1 0
2 followers
30 386 downloads
Yii Version: 2.0
License: MIT
Category: User Interface
Developed by: lesha724 lesha724
Created on: Mar 23, 2018
Last updated: (not set)
Packagist Profile
Github Repository

Related Extensions