DEV Community

How to check that a PDF converter does not upload your file anywhere

Every PDF-to-Markdown service says it is private. "We don't store your files" and "the file never leaves your machine" sound like the same sentence, and they are not.

This post shows the difference, and gives you a small script that checks the second claim for real instead of trusting a landing page. All numbers below come from one 15-page paper (2.2 MB) converted on LlmFiles.

"We don't store it" is not "it never leaves"

Three different promises get mixed together:

  • No retention. The file is parsed in memory and nothing is written to disk. But the whole file still travels to their server every time.
  • Own servers. Same upload, just a different company receiving it.
  • Local conversion. The converter runs on your computer. Nothing leaves, as long as it makes no other network call.

Nothing in the first two sentences tells you it is the third one. "No retention" is a promise about the copy after the fact, not about the copy in transit.

Your file is mostly not text

The paper converts to 39,662 characters of Markdown - 5,868 words. The file on disk is 2.2 MB. The text you wanted is about 1.8% of what you sent. The other 98% is fonts, page objects, images and links.

A converter needs none of it. But an upload sends all of it.

And it also sends the metadata, which nobody reads. In the same PDF the fields say which LaTeX version produced it and when. In a four-slide deck I converted, the metadata said the file was last modified by Steve Canny in January 2013 - because the deck was built from an old template.

Real files are worse: author names, company, sometimes a path on someone's disk. None of that metadata showed up in the Markdown output. It had nothing to do with the conversion. It travelled because the file was uploaded whole.

The check: cut the network and convert anyway

Here is a small script. It blocks every outgoing connection in Python, then runs the converter inside it. If the conversion still finishes, the file went nowhere.

#!/usr/bin/env python3
"""netguard.py - run a Python program with every outbound call denied."""
import runpy, socket, sys
attempts = []
def block(what):
    def inner(*args, **kwargs):
        attempts.append(f"{what} {args[:2]!r}"[:120])
        raise OSError(f"netguard: {what} blocked")
    return inner
socket.socket.connect = block("connect")
socket.create_connection = block("create_connection")
socket.getaddrinfo = block("getaddrinfo")
argv = sys.argv[1:]
code = 0
try:
    if argv[0] == "-m":
        sys.argv = [argv[1]] + argv[2:]
        runpy.run_module(argv[1], run_name="__main__")
    else:
        sys.argv = argv
        runpy.run_path(argv[0], run_name="__main__")
except SystemExit as exc:
    code = int(exc.code or 0)
except OSError as exc:
    print(f"netguard: stopped: {exc}", file=sys.stderr)
    code = 1
print(f"netguard: exit {code}, network attempts: {len(attempts)}", file=sys.stderr)
sys.exit(code)

Test the guard first. A script that only fetches a web page must fail, otherwise the guard proves nothing:

$ python3 netguard.py leak.py
netguard: exit 1, network attempts: 1
attempt: create_connection (('example.com', 80), 5)

Then the real conversion:

$ PYTHONPATH=. python3 netguard.py -m app.cli convert paper.pdf -o out
OK paper.pdf (5868 words)
netguard: exit 0, network attempts: 0

The output was byte-identical to a normal run (same SHA-256), and it took 5.7 seconds. Zero network attempts. The same check around the HTTP service gave the same result on three uploads.

If a service claims local conversion and its converter needs the internet, this test shows it in one line.

What honestly still needs a network

  • Scans need OCR. A scanned PDF has no text layer, and a good converter says so instead of returning garbage: HTTP 422, "This PDF has no text layer". Run ocrmypdf locally first, then convert.
  • Audio needs a model. The first transcription downloads a Whisper model of about 150 MB. After that it works offline.
  • A hosted converter is still a server. It can parse in memory and forward nothing, but the file does leave your network. When that is not acceptable, run the tool locally.

Five questions before you upload anything

  • How long do you keep the file, and is deletion immediate?
  • Does the extracted text go to an OCR or AI service afterwards?
  • Who runs the service, and who answers for the data?
  • Is there a local or on-prem option, or is the cloud the only way?
  • What comes back on an error? If the message quotes your file, you just saw their storage.

The short version

"No retention" describes the copy on their disk. Only "local" describes your file. Everything else is a landing page, and this is a 30-line test that you can run on your own machine in five minutes.

Cross-post. The full measurements are at PDF to Markdown without the cloud. I tested this on LlmFiles, a free converter for PDF, DOCX, XLSX, PPTX, EPUB and 19 more formats, with an API and an MCP server. The guard is the part you can reproduce with any tool.

Drafted with AI assistance from measured results.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.