# Embed pdf in Github pages

**URL:** https://talk.jekyllrb.com/t/embed-pdf-in-github-pages/4527
**Category:** Help
**Created:** [June 2, 2020, 11:29pm UTC](https://talk.jekyllrb.com/t/embed-pdf-in-github-pages/4527 "2020-06-02T23:29:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![elin35](https://avatars.discourse-cdn.com/v4/letter/e/90db22/32.png) [@elin35](https://talk.jekyllrb.com/u/elin35)
#### Post date: [June 2, 2020, 11:29pm UTC](https://talk.jekyllrb.com/t/embed-pdf-in-github-pages/4527/1 "2020-06-02T23:29:49Z")

</div>

Hello, I was wondering if anyone knows a way to embed (i.e. display on that exact page) a pdf file that I’ve added to my github repo (in like a folder called \_pdfs in the main directory). I’d like to avoid just having a link that the viewer can click on which opens in another page, or prompts a download.

I’m pretty new to html and working with github pages, so I’ll be happy to get any advice.

In case it matters, I’m using minimal mistakes as a template for my GHpages.

---

<div class="post-metadata">

### Author: ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)
#### Post date: [June 2, 2020, 11:58pm UTC](https://talk.jekyllrb.com/t/embed-pdf-in-github-pages/4527/2 "2020-06-02T23:58:39Z")

</div>

> <https://stackoverflow.com/questions/291813/recommended-way-to-embed-pdf-in-html>

---

<div class="post-metadata">

### Author: ![pacharanero](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/pacharanero/32/3890_2.png) [@pacharanero](https://talk.jekyllrb.com/u/pacharanero)
#### Post date: [September 16, 2021, 12:09pm UTC](https://talk.jekyllrb.com/t/embed-pdf-in-github-pages/4527/3 "2021-09-16T12:09:25Z")

</div>

I had this exact requirement and found that using HMTL `object` worked in a single line of code.  
Source: [jekyll - Inserting my pdf in my blogs - Stack Overflow](https://stackoverflow.com/questions/46105960/inserting-my-pdf-in-my-blogs)

`<object data="../assets/path/to/document.pdf" width="1000" height="1000" type='application/pdf'></object>`

---

<div class="post-metadata">

### Author: ![Digger](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@Digger](https://talk.jekyllrb.com/u/Digger)
#### Post date: [December 4, 2024, 10:44am UTC](https://talk.jekyllrb.com/t/embed-pdf-in-github-pages/4527/4 "2024-12-04T10:44:15Z")

</div>

Quick reply to let other readers know this still seems to work on Jekyll Github Pages. Thanks to @pacharanero for sharing, bc embed, iframe etc do not work.
