online document viewer ΒΆ
Π²ΠΈΠ΄ΠΆΠ΅Ρ Π΄Π»Ρ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ 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 ΒΆ
- https://support.office.com/uk-ua/article/ΠΠ΅ΡΠ΅Π³Π»ΡΠ΄-Π΄ΠΎΠΊΡΠΌΠ΅Π½ΡΡΠ²-Office-Π²-ΠΠ½ΡΠ΅ΡΠ½Π΅ΡΡ-1cc2ea26-0f7b-41f7-8e0e-6461a104544e?ui=uk-UA&rs=uk-UA&ad=UA&fromAR=1
- https://products.office.com/en-us/office-online/view-office-documents-online
- https://support.office.com/uk-ua/article/ΠΡΠ΄ΡΡΠΈΠΌΠΊΠ°-Π±ΡΠ°ΡΠ·Π΅ΡΡΠ²-Ρ-Π²Π΅Π±-ΠΏΡΠΎΠ³ΡΠ°ΠΌΠ°Ρ -Office-Online-ad1303e0-a318-47aa-b409-d3a5eb44e452?ui=uk-UA&rs=uk-UA&ad=UA
- https://geektimes.ru/post/111647/
- http://viewerjs.org/
- http://viewerjs.org/examples/
- https://github.com/kogmbh/ViewerJS
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.