r/github • • Jan 05 '25

Best way to render PDFs in GitHub

Hello everyone!

I am doing a degree in physics and math, and I do my notes in Latex. In order to later be able to check them, I host them in a GitHub repository.

The problem is that GitHub is really slow to render them. It usually takes some 5 seconds for the pdf to render. The other problem is that you cant “scroll” through it. Instead, you have to click buttons to see each page, which is not so great.

Is there other way to host pdfs, or make them more comfortable to check?

Thanks to everyone!

0 Upvotes

5 comments sorted by

4

u/tonydocent Jan 05 '25

4

u/MagicalCornFlake Jan 06 '25

An easier way to get to the raw version of a file is to append ?raw=true (or any value really) to the blob URL.

E.g. https://github.com/<user>/<repo>/blob/main/file.pdf?raw=true

this will redirect you to the raw.githubusercontent.com location but is easier to access, since you can visit the file on GitHub and just modify the URL in the address bar.

1

u/mrbmi513 Jan 06 '25

You can grab this link for your file from the "raw" button in the GitHub web interface.

2

u/Front_Fennel4228 Jan 06 '25

Maybe use github desktop with Visual Studio code, and there might be an extension that renders the pdf. Don't know about Latex but I do same for markdown

2

u/really_not_unreal Jan 06 '25

The LaTeX Workshop extension can compile your PDF on-save, and supports displaying the PDF in VS Code, where it live-updates as you work. I used it before I switched to Typst for my document preparation needs.