Skip to content

Instantly share code, notes, and snippets.

@Vopaaz
Created January 2, 2020 05:06
Show Gist options
  • Save Vopaaz/fb5ad4f4bcb4c12ef33a3f8bb245f152 to your computer and use it in GitHub Desktop.
Save Vopaaz/fb5ad4f4bcb4c12ef33a3f8bb245f152 to your computer and use it in GitHub Desktop.
Compile LaTeX online using https://latexonline.cc/
import requests
from urllib.parse import quote
content = quote(r'''
\documentclass{article}
\title{Title}
\author{Author}
\date{\today}
\begin{document}
\maketitle
Content
\end{document}
''')
r = requests.get("https://latexonline.cc/compile?text=" + content)
print(r.status_code)
with open("res.pdf", "wb") as f:
f.write(r.content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment