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

Scroll through pages

Open Oravishayrizi opened this issue 3 years ago • 9 comments

I use the Embed-pdf-shortcode for displaying my CV on my personal website.

I wonder if there could be an option in which the few pages will display automatically one after the other (as a long page) without the need to press next/previous.

Oravishayrizi avatar Mar 18 '21 14:03 Oravishayrizi

Hey there @Oravishayrizi ! Great to know that you are using it to display your cv. The shortcode uses pdfjs by Mozilla so ideally it should support everything that is supported by it. Let me see if I can enable that or provide a configure option. It would be great if you could raise a feature request issue.

Please do share the link to your website / page.

anvithks avatar Mar 18 '21 15:03 anvithks

Hi, thank you for your reply and sorry for the long delay. Where should I raise a feature request?(I'm quite a newbie)

Here's a link to my cv page on my website

Oravishayrizi avatar Dec 03 '21 09:12 Oravishayrizi

I've embedded my CV in my portfolio page without the pagination. Currently you'll have to scroll through the entire page. You can add a inner scrollable by adding overflow-y-scroll to the css. Hope it helps.

Link to repo: https://github.com/SuryaThiru/portfolio

SuryaThiru avatar Dec 26 '21 11:12 SuryaThiru

I've embedded my CV in my portfolio page without the pagination. Currently you'll have to scroll through the entire page. You can add a inner scrollable by adding overflow-y-scroll to the css. Hope it helps.

Link to repo: https://github.com/SuryaThiru/portfolio

Thanks @SuryaThiru . Would you consider raising a PR for this?

anvithks avatar Dec 27 '21 07:12 anvithks

@anvithks Unfortunately, I am unable to find the time to do so at the moment. But, I hope my implementation can be a reference for those who wish to.

SuryaThiru avatar Dec 27 '21 17:12 SuryaThiru

The solution by SuryaThiru works, here is how I installed it:

  • copy embed-pdf.html from here: https://raw.githubusercontent.com/SuryaThiru/portfolio/6af98cdaf0eb3f8f89e155c24463b206c2baf5b5/layouts/shortcodes/embed-pdf.html
  • check that pdf.js can be accessed here: /static/js/pdf-js/build/pdf.js
  • call with {{< embed-pdf url="./pdf/uei.pdf" >}}

Done!

RoneoOrg avatar Jul 31 '22 07:07 RoneoOrg

Thank you @RoneoOrg .@SuryaThiru if it's alright can I or @RoneoOrg add this to Hugo Embed Pdf? I can share a reference to your repo in the code.

anvithks avatar Aug 01 '22 13:08 anvithks

Thank you @RoneoOrg .@SuryaThiru if it's alright can I or @RoneoOrg add this to Hugo Embed Pdf? I can share a reference to your repo in the code.

Please do! I wanted to get it sorted myself but couldn't find the time to. I'm glad you guys were able to resolve this.

SuryaThiru avatar Aug 01 '22 13:08 SuryaThiru

Here is a repo where the full PDF is displayed without pagination:

https://github.com/RoneoOrg/hugo-embed-pdf-shortcode-roneo

See especially the commit https://github.com/RoneoOrg/hugo-embed-pdf-shortcode-roneo/commit/a4c6c7b76d53fe8ad2c9476c73b5d03545efbdb1

RoneoOrg avatar Sep 30 '22 05:09 RoneoOrg