A local PyMuPDF workflow for batch conversion, plus a browser alternative for occasional tasks.
Choose a local workflow
A script is useful for a repeated task or a folder of documents. For an occasional conversion, the browser tool avoids installing Python packages. Both approaches can keep document processing on your own machine. This example runs on your computer; it is not a hosted API endpoint.
Install the dependency
Create and activate a Python virtual environment, then run python -m pip install pymupdf. Save the example below as pdf_to_png.py and place document.pdf beside it. It uses PyMuPDF directly rather than pdf2image. Consult the official installation guide if no suitable package is available for your system.
from pathlib import Path
import pymupdf
source = Path("document.pdf")
output = Path("output")
with pymupdf.open(source) as document:
if document.needs_pass:
raise ValueError("Unlock the PDF before converting it.")
output.mkdir(exist_ok=False)
for number, page in enumerate(document, start=1):
image = page.get_pixmap(dpi=144, alpha=False)
image.save(output / f"page-{number:03d}.png")
Render and inspect
Run python pdf_to_png.py from that directory. The script creates an output directory, renders each page at 144 DPI and writes separately numbered PNG files. Change the input filename and output directory for a new run to avoid overwriting earlier results. Test a short document first.
Scale carefully
Higher resolution increases memory use. Work page by page, review a sample and retain the source PDF because images do not retain selectable text or interactive features. The example refuses encrypted documents. Review PyMuPDF’s license before incorporating it into distributed software or a hosted service.
Frequently asked questions
Can I choose specific pages?
Yes. Enter a range such as 1, 3-5. Export up to 100 pages per operation, with a download link for each image.
Is it free on mobile?
Yes. No account or payment. Use a recent browser; capacity depends on your device memory.
Are my files uploaded or tracked?
No. Documents are processed in your browser memory. No document uploads, no ads, no tracking cookies and no visitor analytics. The server receives the requests needed to serve the website.