TwisterMc / pdfjs-viewer-shortcode

A Wordpress plugin for embedding PDFs using Mozilla's Excellent PDF.js
https://wordpress.org/plugins/pdfjs-viewer-shortcode/
Apache License 2.0
7 stars 5 forks source link

Make use of pdfobject.js ? #21

Open printpagestopdf opened 1 year ago

printpagestopdf commented 1 year ago

I was building a similar (but not so sophisticated, only as shortcode) solution for a website, but decided to use pdfobject.js https://pdfobject.com/ on front that checks the browser for an intrinsic pdf viewer and adds the pdf by an embed tag in this case. Only if it recognizes that ther is no pdf viewer support it calls something else (in my case, exactly what you are doing, invoking a pdf.js viewer in iframe). Perhaps this could be a good enhancement for your plugin? It speeds up many things in case of browser support.

TwisterMc commented 1 year ago

Definitely something I can look into. Have you tried it on mobile?