
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
markdown-html-pdf
Advanced tools
A powerful Python package to convert Markdown files to PDF with syntax highlighting and emoji support
A powerful Python package to convert Markdown files to PDF with syntax highlighting and emoji support.
uv add markdown-html-pdf
After installation, you need to install Playwright browsers:
sudo $(which uv) run playwright install
For proper emoji rendering in PDFs on Linux systems, you need to install the Segoe UI Emoji font. This is required for emojis to display correctly in the generated PDFs.
sudo $(which uv) run install-emoji-fonts
Note: This step is only required on Linux systems and needs to be run once per system.
# Basic conversion
uv run markdown-html-pdf input.md output.pdf
You can also use the shorter alias:
uv run md2pdf input.md output.pdf
markdown-html-pdf or md2pdf: Convert Markdown to PDFinstall-emoji-fonts: Install emoji fonts for Linux systems (requires sudo)import asyncio
from markdown_html_pdf.tools import markdown_to_pdf
async def convert():
await markdown_to_pdf(
markdown_file_path="input.md",
pdf_output_file_path="output.pdf"
)
asyncio.run(convert())
markdown-it-py with GitHub-flavored Markdown supportInline code and code blocks with syntax highlightingIf emojis are not displaying correctly in your PDFs on Linux systems:
Install emoji fonts:
sudo $(which uv) run install-emoji-fonts (uses full path)Verify installation: Check if fonts are installed with fc-list | grep -i emoji
Restart applications: Restart your terminal and any running applications
Check permissions: Ensure the font files have proper permissions (644)
If you encounter issues with Playwright browsers:
uv run playwright installuv run playwright install-depsMIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
A powerful Python package to convert Markdown files to PDF with syntax highlighting and emoji support
We found that markdown-html-pdf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.