Adding PDF Shortcut
@hossainemruz give me the OK and I will implement it :p
Sure. Go on.
Hey! I will add this snippet if you don´t think it´s a problem
That will be great @toniop99
Yes please! I wanted to do this, but havent found any time since. Maybe it can be added as a git submodule to preserve copyright? Not sure though
Yes please! I wanted to do this, but havent found any time since. Maybe it can be added as a git submodule to preserve copyright? Not sure though
From what I'm reading there are certain issues that need to be changed manually because the project is not maintained. We have two possibilities:
Copy the project and make the necessary changes to make it work
Find another project with similar functionality
Hello! I have created this shortcode that use the embed pdf api from adobe
If you consider it would be a good option to add to the theme we can do it with no problem.
It not as easy as a native pdf viewer, because the user has to create an api on adobe console, but is an easy and beautiful option!
I would position myself against adding a privative piece of code to an otherwise open source theme, but this of course could just be optional. Maybe we could add this one as embed-pdf-adobe, and call the other one embed-pdf-native? I have it working on my computer, I can pushit asap if @hossainemruz agrees
I agree with you @MarionMoseby. Native one should be the default choice. We can just name it embed-pdf or pdf. The adobe one could be available as an option.
I think us all of you. If we don't want to add it because it is very invasive, maybe we can add to the documentation the option for anyone who wants to use it at your discretion.
The pdf.js library weights 15 mb. I am usually in favor of loading things locally, but maybe this is a bit too much to add to the repo? How do you feel, maybe use a CDN?
I have no issue with CDN. However, other user might have. We have to make sure this library is loaded only when there is a pdf in the page. Otherwise, it will make the site heavy.
Sorry @hossainemruz, I didn't see your message, although I think my commit fits what you are saying: the PDF.js library is only loaded when the PDF is being actively displayed on the page. One possible improvement could be adding a "download" button to the top menu; what do you think? Currently, it shows each page as an image