Skip to content

It doesn't work #26

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

Open
nicfab opened this issue Jan 8, 2022 · 14 comments
Open

It doesn't work #26

nicfab opened this issue Jan 8, 2022 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@nicfab
Copy link

nicfab commented Jan 8, 2022

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

@jmooring
Copy link

jmooring commented Jan 8, 2022

@anvithks
Copy link
Owner

anvithks commented Jan 9, 2022

@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 anvithks added the bug Something isn't working label Jan 9, 2022
@anvithks anvithks self-assigned this Jan 9, 2022
@nicfab
Copy link
Author

nicfab commented Jan 9, 2022

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

@anvithks
Copy link
Owner

@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
Copy link
Author

nicfab commented Jan 10, 2022

@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 <script src= '/js/pdf-js/build/pdf.js'></script>
  • 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.

@RoneoOrg
Copy link
Contributor

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

@nicfab
Copy link
Author

nicfab commented Sep 30, 2022

@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
Copy link
Author

nicfab commented Oct 2, 2022

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

@anvithks
Copy link
Owner

@nicfab Would love to know if you were able to use the shortcode?
@RoneoOrg's changes have been merged and some more modifications made.
You can take a look at the example site here

Let me know if you still need help with this.

@nicfab
Copy link
Author

nicfab commented Mar 17, 2023

@nicfab Would love to know if you were able to use the shortcode? @RoneoOrg's changes have been merged and some more modifications made. You can take a look at the example site here

Let me know if you still need help with this.

@anvithks Thank you so much.
Now it works 👍

@anvithks
Copy link
Owner

@nicfab Would love to know if you were able to use the shortcode? @RoneoOrg's changes have been merged and some more modifications made. You can take a look at the example site here

Let me know if you still need help with this.

@anvithks Thank you so much.
Now it works 👍

Yay! Great !
Please let me know where you are using the plugin .
If it's alright I would like to add it to the Readme .

@nicfab
Copy link
Author

nicfab commented Mar 17, 2023

@nicfab Would love to know if you were able to use the shortcode? @RoneoOrg's changes have been merged and some more modifications made. You can take a look at the example site here
Let me know if you still need help with this.

@anvithks Thank you so much.
Now it works 👍

Yay! Great ! Please let me know where you are using the plugin . If it's alright I would like to add it to the Readme .

I am using the plugin with my Hugo websites.
Let me know if I can be helpful to you and how.

@nicfab
Copy link
Author

nicfab commented Mar 17, 2023

Is it possible to block the download allowing only the user to read the pdf online?

@RoneoOrg
Copy link
Contributor

Is it possible to block the download allowing only the user to read the pdf online?

You should open another dedicated ticket, with a clear title, to track this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants