Display PDF in GitHub Markdown

33k views Asked by At

This is quite similar to what is being asked in this post, but the post does not seem to work for GitHub's parsed Markdown.

Simply put, let us say I have a PDF in a GitHub repository. Is there any way to render/embed that in a markdown file that is in the repository (e.g. the README.md file)?

I would also be open to having the PDF in a location other than GitHub and linking to it from the markdown file if that is what is required to make this work.

2

There are 2 answers

2
atin On BEST ANSWER

Currently there is no way to preview a pdf in github markdown, however you can embed an image of the pdf.

Edit
From here:

The best you can do is a greasemonkey extension which would allow you to call a pdf viewer, like the recent pdf.js (a Portable Document Format (PDF) viewer that is built with HTML5.), allowing you to view a pdf entirely online, without any pdf plugin installed.

0
Tarek Hammami On

As far as I know, this is not possible on GitHub.

However, you can upload it as a file in the same repository and then add a link to it with a relative path.

[Some title here](FILE_NAME.pdf)