-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load PDF.js library from CDN #19
Conversation
@anvithks here's the requested PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericswpark thanks for this PR. As you pointed out reverting the previous commit is needed to test it locally. I was able to test this but I feel removing the local files support may not work out for everyone.
I would like to explore the option of making this configurable and allowing the user to use either the CDN or local install.
Let me know if you could help out with this.
I understand but unfortunately I do not have the time right now. I'll close the PR but feel free to base changes off of this PR. |
Sorry about that. |
@ericswpark I spent some time over the weekend on the shortcode and tested all the PRs. This is mentioned in the embed-pdf.html file as part of the pdf.js inline comments
In this case the CDN comes in handy. I would like to merge this PR but it removes the static library. Ideally I would like the users to have the option of either installing via CDN or static library. Would it be possible for you to just remove the commits wherein the static library has been removed. It could default to the CDN and if there is a requirement to keep it local then they can follow the alternate installation steps. Please let me know your thoughts. |
@anvithks I've dropped the commits that remove the library. |
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Tested this and it seems to work with the latest PDF.js version as well.
Need to add the following comment to embed-pdf.html for those who wish to use local version of files.
<!-- If using the baseURL then use this src= '{{"/" | relURL}}js/pdf-js/build/pdf.js' -->
Closes #18
Closes #2