Skip to content

Commit

Permalink
Create md2pdf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mprinkezs authored Sep 9, 2024
1 parent 99da5e6 commit 33da23d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/scripts/md2pdf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# md2pdf.py
#
# Carl Zeiss GOM Metrology GmbH, 2024
#
# ---
'''Convert Markdown document to PDF'''
import sys
from markdown_pdf import MarkdownPdf, Section

pdf = MarkdownPdf(toc_level=4)
pdf.add_section(Section(open(sys.argv[1], encoding='utf-8').read(), toc=False), user_css="body {font-family: sans-serif;}")
pdf.meta["title"] = "Releasenotes"
pdf.save(sys.argv[2])

0 comments on commit 33da23d

Please sign in to comment.