Skip to main content

Markdown to PDF converter using Pandoc and Typst

Project description

yakultpdf

Markdown to PDF Converter based on Pandoc and Typst

Convert Markdown files into beautiful PDFs. Supports Frontmatter configuration, automated TOC management, and Python API usage.

Installation

pip install yakultpdf

Note: Ensure Pandoc and Typst are installed before use.

CLI Usage

1. Initialization & Configuration

# Initialize workspace (create configuration and directory structure)
yakultpdf init

# Install common Chinese fonts (e.g., lxgw-wenkai)
yakultpdf fonts install lxgw-wenkai

2. Convert Documents

# Convert single file (default output to out/ directory)
yakultpdf convert document.md

# Convert single file with specified output filename
yakultpdf convert document.md --output my-report

# Convert entire directory (automatically merge all md files in directory)
yakultpdf convert --dir docs/

3. More Features

# Copy built-in templates to local template/ directory
yakultpdf template

Python API Usage

Note: use mark2pdf for importing:

from mark2pdf import convert_file, convert_directory

# 1. Convert single file
# Convert input.md to output.pdf with default configuration
convert_file("input.md", output_file="output.pdf")

# 2. Convert directory
# Merge all Markdown files in docs directory and convert to merged_report.pdf
convert_directory("docs", output_file="merged_report.pdf")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yakultpdf-0.7.27.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yakultpdf-0.7.27-py3-none-any.whl (282.0 kB view details)

Uploaded Python 3

File details

Details for the file yakultpdf-0.7.27.tar.gz.

File metadata

  • Download URL: yakultpdf-0.7.27.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for yakultpdf-0.7.27.tar.gz
Algorithm Hash digest
SHA256 2d61cfa0881ce71cc873d0f127ceb6a8f41d712d17725b929277c133584c0094
MD5 9dbcb0a7ffc64c329b786b86abf1b447
BLAKE2b-256 148d09bdbc984ae2eabb05d0a5485fbb8e8957f165c6c051b2b375099c1b07bd

See more details on using hashes here.

File details

Details for the file yakultpdf-0.7.27-py3-none-any.whl.

File metadata

  • Download URL: yakultpdf-0.7.27-py3-none-any.whl
  • Upload date:
  • Size: 282.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for yakultpdf-0.7.27-py3-none-any.whl
Algorithm Hash digest
SHA256 217479f256a3af8480574de10f030af469af6088cc6becb16bd64a391b087d3b
MD5 6bda2a4853e28dfb44479ea12bd9db79
BLAKE2b-256 ec4f3bfe37945dac8776a8980591087c91c14820f31066d3b4cad0b287d61c2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page