Pdf.js and hugo


I’m trying to put PDF file in my website.
I use Hugo through Blogdown at the moment but i’m quite flexible.

I want to use pdf.js instead of redirecting it to example.pdf.

I understand that I need to change the HTML to md file. and put it in the content folder. However, results doesn’t look as expected (or, as seen it in localhost outside hugo site).

Is there any good way to use pdf.js on Hugo?

1 Like

I’m looking for the solution as well and still struggling with it.

From briefly reading their docs, pdf.js can do many things. Do you just want it for displaying pdfs a certain way?

I’m all set up now. I’ve been figuring for long but it worked. My bad I didn’t understood the PDF.js documentations well thar time. Thanks!

Visit me at http://shermisaurus.js.org/


Hi there, I’m also interested in having a PDF reader on my website, something that simulates a newspaper with some animations and etc.

Your website seems to be down, did you end up figuring it out? And if you did, can you show how it looks and how you did it?