Closed leimportant closed 1 year ago
salam om. masih ada bugnya sebenernya om, tp karena sudah ga pake lagi jd blm saya benerin, sbelumnya sepet pakai, saya pakai yg yii2-advance, jd masih blm match buat path filenya om, mungkin om bisa berkontribusi buat menyempurnakannya om, filenya ada di ViewerPDF.php-nya sm di folder view-nya om.
Hi there,
I have checked this extension yesterday, and unfortunately it looks very raw.
As I understand question from google translate, you have faced with problem when viewer doesn't show it controls. To resolve it, you should clean up template file (views/_viewer.php) from tags that should not be there (ex </head>, <body> and so on). The next thing you should fix some css styles, as I remember I have some problems with position of main container.
I'm not using yii2-advance, so after clean-up I have modified paths in ViewerPDF.php to use with yii2-base (use web/assets/pdfjs/ paths), after this I have copied "assets" folder to "web/assets/pdfjs"
And after this manipulation, it worked as expected.. but at the end, I have found simplest way to use pdfjs, I just copied latest sources from pdfjs site to web folder and include it in very simple way:
<iframe src="path/to/pdfjs/viewer.html?file=myfile.pdf" style="width:500px; height:400px;"></iframe>
This solution I have found in blog, that you can find by this query in google: "Integrating PDF.js as PDF viewer in your web application". It isn't my blog, so it isn't ad or spam. It's just another solution.
At the end I want to say thank you to wahyugnc to share his solution with us and I think I will use it when (may be someday) it will be fixed.
Thank Vitaliy S. Orlov on the advice that has been given to me, maybe you can develop this extension in the future, I hope you can join to develop this extension so as to be better, :)
salam om wahyu. saya coba pakai ext yii2-pdfjs tapi kenapa file pdfnya tidak tampil. hanya toolbarnya saja yng tampil. apakah om sudah coba ext ini? dan apakah sudah berjalan dengan baik?.
terimakasih sebelumnya.