Spaces:
Sleeping
Sleeping
Download scripts/convert_pdf.py from TrinetraLabs/Placebo_AI: direct link, hf CLI and curl.
- Browser
- Download file 435 Bytes
-
https://huggingface.co/spaces/TrinetraLabs/Placebo_AI/resolve/main/scripts/convert_pdf.py
- Command line
-
hf download hf://spaces/TrinetraLabs/Placebo_AI/scripts/convert_pdf.py
-
curl -L -o convert_pdf.py https://huggingface.co/spaces/TrinetraLabs/Placebo_AI/resolve/main/scripts/convert_pdf.py
435 Bytes
| from markdown_pdf import MarkdownPdf, Section | |
| def convert_md_to_pdf(): | |
| print("Converting PITCH_DECK.md to PITCH_DECK.pdf...") | |
| pdf = MarkdownPdf(toc_level=2) | |
| with open("PITCH_DECK.md", "r", encoding="utf-8") as f: | |
| md_content = f.read() | |
| pdf.add_section(Section(md_content)) | |
| pdf.save("PITCH_DECK.pdf") | |
| print("Successfully created PITCH_DECK.pdf!") | |
| if __name__ == "__main__": | |
| convert_md_to_pdf() | |