Labsco
MCP SERVER

PDF to PNG

by truaxki

Turn a PDF into one PNG per page so a model can actually look at the document instead of guessing at extracted text.

Document Conversion, PDF & Translation
Summary
One tool, two arguments — and poppler is the only thing that will trip you up.

Rendering pages as images is what lets a multimodal model read a scanned document, a form or a chart that text extraction turns into noise. The dependency to install before anything works is poppler; without it pdf2image cannot render and the tool fails at conversion rather than at startup.

What it is

A single-purpose Python server that converts a PDF into page images on disk. It takes an input path and an output folder, and writes the images there — nothing large passes through the conversation.

What you get
  • `pdf2png` takes `read_file_path` for the PDF and `write_folder_path` for the destination directory
  • Every page becomes a PNG, named page_1.png, page_2.png and so on
  • The call returns a success message with the number of pages converted
  • Both paths are absolute, so the files land exactly where you point them
Requirements

Python 3.10 or higher, the uv package manager, and poppler installed for pdf2image — `brew install poppler` on macOS, `sudo apt-get install poppler-utils` on Linux, or the poppler-windows release on Windows. Clone the repository, create the environment with `uv venv` and install with `uv pip install -e .`, then launch it as `uv --directory <absolute path> run pdf2png`. The Python package is `pdf2png`, version 0.1.0.

Setup effort

One command — uvx pdf2png