io.github.Moonwalker1307/pdfpecker is an MCP server that HTML and Markdown to PDF with page previews, PDF text and merging. No browser, no network. Its tool list has not been published yet over stdio, requires no API key, and scores 60/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"pdfpecker": {
"args": [
"pdfpecker",
"mcp",
"--root",
"/Users/me/Documents/pdfs"
],
"command": "uvx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
HTML and Markdown to PDF with page previews, PDF text and merging. No browser, no network.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
uvx 'pdfpecker' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked pdfpecker against OSV.dev.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in writing
Scrape, crawl, and map websites to Markdown or JSON via local CLI.
Create and edit PDFs: text, Markdown, tables, metadata and pages, with Japanese font embedding.
Any file → clean Markdown for AI agents: PDF, Office, EPUB, HTML, images, audio/video. Local MCP.
一键同步文章到多个内容平台,支持今日头条、WordPress、知乎、简书、掘金、CSDN、typecho各大平台,一次发布,多平台同步发布。解放个人生产力
MCP Security Weekly
Get CVE alerts and security updates for io.github.Moonwalker1307/pdfpecker and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Fast HTML and Markdown to PDF, and PDF to images and text, for Python. No browser, no dependencies, no .NET to install.
pip install pdfpecker
import pdfpecker
pdf = pdfpecker.html_to_pdf("<h1>Invoice 42</h1><p>Total: <b>1,250.00 EUR</b></p>")
pdfpecker.html_file_to_pdf("templates/invoice.html", "invoice.pdf") # images and CSS resolve next to the file
pdfpecker.markdown_file_to_pdf("README.md", "readme.pdf")
pngs = pdfpecker.pdf_to_images(pdf, dpi=96) # one PNG per page (or format="jpeg"/"webp")
text = pdfpecker.pdf_to_text(pdf) # pages separated by \f
both = pdfpecker.merge_pdfs([pdf, "terms.pdf"])
This is the PdfPecker .NET library, compiled ahead of time into a native library that ships inside the wheel. PdfPecker has its own HTML parser, CSS engine, layout engine, PDF writer and PDF renderer, so a conversion takes about a millisecond for a one-page invoice and never starts a browser. The package version is the library version it holds. Documentation of what PdfPecker renders, its CSS support and its limitations: pdfpecker.net/docs.
Wheels for Linux (glibc 2.28+ and musl, x86-64 and ARM64), macOS (Apple Silicon and Intel) and Windows (x64 and ARM64), on Python 3.9 and later. Each wheel is about 9 MB and has no Python or system dependencies.
From Python, on a 4-core Linux cloud VM, median time per document after warm-up; the documents are the benchmark pages of the PdfPecker repository:
| Invoice, 1 page | Feature tour, 5 pages | Report, 29 pages | Start-up and first PDF | Peak memory, one PDF | |
|---|---|---|---|---|---|
| pdfpecker | 0.7 ms | 2.9 ms | 32 ms | 57 ms | 32 MB |
| Chromium 153 via Playwright | 24 ms | 48 ms | 290 ms | 735 ms | 542 MB |
| xhtml2pdf 0.2.28 | 33 ms | 209 ms | 2.9 s | 453 ms | 63 MB |
| WeasyPrint 70.0 | 324 ms | 797 ms | 4.2 s | 1.1 s | 75 MB |
Every function takes bytes or a path for PDFs, raises a subclass of PdfPeckerError on failure, is thread-safe and
releases the GIL while it works, so threads convert in parallel.
| Function | Returns |
|---|---|
html_to_pdf(html, **options) | PDF bytes from an HTML str or UTF-8 bytes |
html_file_to_pdf(path, output=None, **options) | PDF bytes, also written to output when given; base_dir is the file's folder |
markdown_to_pdf(markdown, **options) | PDF bytes from CommonMark with GitHub tables, task lists, strikethrough and footnotes |
markdown_file_to_pdf(path, output=None, **options) | as html_file_to_pdf |
pdf_to_images(pdf, dpi=150, format="png", pages=None, width=None, height=None, transparent=False, quality=None, password=None) | a list of encoded images, one per page |
pdf_to_text(pdf, pages=None, password=None, order="reading") | the text in reading order, pages separated by \f; order="top_to_bottom" reads across columns as before 1.24.0 |
pdf_to_text_pages(pdf, pages=None, password=None, order="reading") | a list with the text of each page |
pdf_to_markdown(pdf, pages=None, include_links=True, include_annotations=True, include_images=False, page_comments=False, max_pages=None, password=None) | GitHub Flavored Markdown of any PDF: headings, lists and tables in reading order, for search indexes and language models |
pdf_page_count(pdf, password=None) | the number of pages |
merge_pdfs(pdfs, title=None, author=None, bookmarks=True, creation_date=None) | one PDF from several |
pdf_to_pdfa(pdf, output=None, conformance="PDF/A-2b") | any PDF converted to PDF/A-2b, -2u, -3b or -3u, as a PdfAResult with pdf, changes, problems and is_conformant |
redact_pdf(pdf, output=None, text=None, pattern=None, areas=None, ignore_case=False, fill_color="#000000") | any PDF with the matching text, or the (page, x, y, width, height) areas in points, removed from the file (text, |