hugo-embed-pdf-shortcode
hugo-embed-pdf-shortcode copied to clipboard
It doesn't work
I did according to the instructions. However, it doesn't work. Anything is visible on the page.
Duplicate of https://github.com/anvithks/hugo-embed-pdf-shortcode/issues/18.
Reference: https://discourse.gohugo.io/t/embed-pdf-file-into-a-page-or-post-papermod-theme/36440/2
@nicfab Thanks for raising the issue. Could you please share a link to your page?
@jmooring I saw the discourse discussion and have replied there.
I will try and spend some time on this shortcode this month to get it fixed and updated.
@nicfab Thanks for raising the issue. Could you please share a link to your page?
@jmooring I saw the discourse discussion and have replied there.
I will try and spend some time on this shortcode this month to get it fixed and updated.
With the solution proposed by @jmooring the Shortcode works fine. Indeed, now the plugin works properly. Sometimes I need to publish PDF in “secure mode” (I mean that people don’t have to can downloading the PDF); other times, I need to publish PDF allowing people to download. Currently, I seem that it isn’t possible to download the PDF; am I wrong?
@nicfab Thanks for raising the issue. Could you please share a link to your page? @jmooring I saw the discourse discussion and have replied there. I will try and spend some time on this shortcode this month to get it fixed and updated.
With the solution proposed by @jmooring the Shortcode works fine. Indeed, now the plugin works properly. Sometimes I need to publish PDF in “secure mode” (I mean that people don’t have to can downloading the PDF); other times, I need to publish PDF allowing people to download. Currently, I seem that it isn’t possible to download the PDF; am I wrong?
At the moment there is no support for downloading the PDF file. Since hugo-embed-pdf is based on the pdf.js library, which supports pdf downloading, it should be possible to add the support. Could you please raise a separate issue for this as a feature request? I will try to see if I can add this feature in the next release.
@nicfab Thanks for raising the issue. Could you please share a link to your page?
Thank you for your reply. You can see as I use your code here: https://www.nicfab.it/en/en/posts/eprivacy-regulation-the-current-perspective/ The map you see (the first resource after the image) is a PDF embedded using your code.
At the end of this page https://www.nicfab.it/en/en/posts/the-meaning-of-scientific-research-privacy-and-personal-data-protection-international-contexts/
I tried to add two shortcodes at the end of the file, but I am afraid it doesn't work, although I changed a row in your code as it follows:
- in the beginning, I changed the first line as suggested by @jmooring with
- I changed
window.addEventListener("load",function(){
instead ofwindow.onload = function(event) {
adding the round bracket at the end of the file just before the last line</script>
At the moment, it seems that doesn't work, but I hope you can help me.
@nicfab please see #34 If it does not work please provide a repo URL and functional links (they are both 404^)
@nicfab please see #34 If it does not work please provide a repo URL and functional links (they are both 404^)
Thank you @RoneoOrg I am pretty busy now. I will take note and return it in the following days to verify it.
@nicfab please see #34 If it does not work please provide a repo URL and functional links (they are both 404^)
I tried, and unfortunately, it doesn't work.