I am using GitHub Pages to host my website. I have a PDF file that I want visitors to be able to open directly in a browser. But when I upload the PDF file to GitHub Pages and l
I have gone through most of the answers in this section however most of them are hard to figure out or too vague to understand what is happening. There is a simpler way to do this, so in order to display a Pdf file in a browser from Github here is the process:
Step 1: Make the static website/repository using your Github username for example, if the username is winterishere
then repository would be winterishere.github.io
Step 2: Put the desired pdf in that repository and add an index.html
file in the same location as the pdf file eg: resume.pdf
.
Step 3: Open the index.html
and add the embed tag to it below:
in my example the file the code would be: