hugo-embed-pdf-shortcode icon indicating copy to clipboard operation
hugo-embed-pdf-shortcode copied to clipboard

It doesn't work

Open nicfab opened this issue 2 years ago • 14 comments

I did according to the instructions. However, it doesn't work. Anything is visible on the page.

nicfab avatar Jan 08 '22 06:01 nicfab

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

jmooring avatar Jan 08 '22 19:01 jmooring

@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.

anvithks avatar Jan 09 '22 03:01 anvithks

@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 avatar Jan 09 '22 05:01 nicfab

@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.

anvithks avatar Jan 10 '22 17:01 anvithks

@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 of window.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 avatar Jan 10 '22 17:01 nicfab

@nicfab please see #34 If it does not work please provide a repo URL and functional links (they are both 404^)

RoneoOrg avatar Sep 30 '22 08:09 RoneoOrg

@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 avatar Sep 30 '22 08:09 nicfab

@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.

nicfab avatar Oct 02 '22 13:10 nicfab