Answer the question
In order to leave comments, you need to log in
How to embed Mozilla's pdf.js in Yii2?
How to embed pdf.js library in Yii2? It is desirable to write for the stupid, because I'm not very good at writing extensions and widgets.
You can not offer Yii2Assets/yii2-pdfjs , because it refuses to work in the advanced version of yii2 =D
Answer the question
In order to leave comments, you need to log in
Installed now in 2 lines and everything started up
1. Install through the composer (make sure it's worth it)
2. In the frontend / config / main.php application, insert into the section with modules:
'pdfjs' => [
'class' => '\yii2assets\pdfjs\Module',
],
<?= \yii2assets\pdfjs\PdfJs::widget([
'url'=> Url::base().'/automir.pdf'
]); ?>
frontend/web/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question