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.18.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.18-py3-none-any.whl (277.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yakultpdf-0.7.18.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.18.tar.gz
Algorithm Hash digest
SHA256 76f2f57e0bc25dffcea62d499928723e170ac3aa5fa1cd3003143cc08c219a4d
MD5 344af5f141e47f56802faaf6e075a612
BLAKE2b-256 eb8588ac78fd625d6092323fa275fda35cd0792c9dff20dc181411c6a1767e7d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for yakultpdf-0.7.18-py3-none-any.whl
Algorithm Hash digest
SHA256 4ecd5cf2c4e8043ebe638db0cfed67f83841e4005c9f5a8eca37044d53081800
MD5 7331a333f2c436f69eb57a41bd4b90d6
BLAKE2b-256 ce37ca6c94d2b3b8243463ef05d1e659f281e4e40553fcf9865f16f179d8dbdf

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