prepare PDF for AI

AI Getting Your PDFs Wrong? 7 Fixes Before You Upload

Anyone who uses AI assistants for work has probably had this happen. You upload a long report, ask a simple question about one figure, and the answer comes back fluent, confident, and wrong. The number might belong to the previous year, or it might not appear anywhere in the document at all.

It’s natural to blame the model, but the fault usually lies with the file, and with how PDFs work under the hood.

PDF was built for printing. It guarantees that a page looks the same everywhere, and it cares very little about whether software can make sense of what’s on it. One sentence can be stored as a dozen scattered text fragments. A table might be nothing more than numbers parked at fixed coordinates, and a scanned page is just a photo, with no text inside it whatsoever. An AI tool has to piece the meaning back together from that, and it gets things wrong more often than most people realize.

A little preparation solves most of it, and the tools cost nothing. Browser utilities like PDFVerge take care of routine chores such as splitting, compressing, and pulling out plain text. A few open-source libraries handle the trickier documents.

What goes wrong, in one table

Each type of PDF problem tends to produce its own kind of bad answer, so the symptom usually points you to the cause.

Problem in the fileHow it shows up in the answer

What helps

Scanned or photographed pages“Couldn’t read the file,” or a vague summaryAn OCR text layer
Huge document, narrow questionGeneric answers missing the specificsUploading only the relevant pages
Tables flattened into loose textNumbers from the wrong row, column, or yearExtracting tables separately
Headers, footers, page numbers on every pageStray fragments inside quotesConverting and cleaning the text first
Password or permission locksFailed upload or an empty responseRemoving protection you’re entitled to remove
Black boxes over private detailsThe “hidden” text quoted straight backGenuine redaction

1. Is there actually any text?

A ten-second test answers this. Open the file and try to highlight a sentence. If the cursor selects the whole page as one block, you’re looking at an image, which is usual for scans, faxes and anything photographed on a phone.

Some assistants can read images, but they struggle with small print, dense tables and handwriting, and a few will simply skip pages that contain no text layer. OCR (optical character recognition) fixes this by adding an invisible, searchable layer of text behind each page.

OCRmyPDF is a free, open-source option that does it without changing how the pages look. It’s built on the Tesseract engine, handles many languages, and needs only one command:

bash

ocrmypdf scanned.pdf searchable.pdf

Try the highlight test again on the new file. If you can select the words now, the AI can read them too.

2. Trim it down before uploading

Most people imagine the assistant reading the whole 300-page report from start to finish. Plenty of tools don’t do that. They chop a long file into chunks and pull back only the passages that seem to match your question. When that retrieval step picks the wrong chunk, you get a wrong answer, even though the correct page was sitting in your upload.

Other tools do try to take in everything, but they run into a context limit, a ceiling on how much text a model can work with at once, and details start falling through the cracks.

The remedy works for both. If your question is about chapter 4 or the financial statements, split those pages out and upload just them. You’ll get sharper answers, and the rest of the document never leaves your computer.

3. Big files? Compress the images

Brochures, scanned archives, and exported slide decks can grow to hundreds of megabytes, mostly because of high-resolution images. That’s enough to hit upload limits or make processing painfully slow. Compression shrinks those images while leaving the text the AI reads untouched. Keep the full-quality version for your files and send the lighter copy for analysis.

4. Markdown beats a raw PDF for long, complicated documents

Converting a PDF to text yourself, rather than uploading it and hoping for the best, has one big advantage: you can see exactly what the model is going to read. Broken line wraps, headers repeated on every page, and page numbers landing mid-sentence can all be cleaned up before they confuse.

Markdown is worth aiming for, since it keeps headings, lists, and tables intact as plain text.

Two open-source converters get recommended most often, and they suit different jobs. Docling, from IBM Research, uses its own AI models to work out page layout, reading order and table structure before exporting Markdown or JSON. It runs on your own machine and copes well with multi-column reports and number-heavy tables. Microsoft’s MarkItDown is lighter and faster, and excellent with Word, Excel and PowerPoint files. Its default PDF handling, though, extracts text without analyzing layout or recognizing tables, so it’s better kept for clean, single-column documents.

If you just need a quick plain-text copy and don’t want to install anything, a browser-based PDF-to-text converter will do. Give the output a quick tidy before pasting it in.

5. Tables deserve special treatment

Ask anyone who regularly checks AI answers against source documents, and tables come up as the biggest troublemaker. In a lot of PDFs, a table has no real rows or columns. It’s just numbers placed at particular positions on the page. Flatten that into text, and the columns slide into each other, which is how 2024’s margin ends up reported as 2025’s.

When the figures matter, pull each table out on its own. Docling reconstructs a good share of tables correctly, and the Python library pdfplumber gives you fine control over where rows and columns fall. Paste the result in as CSV or a Markdown table, then ask your question about that table specifically.

And check two or three of the key numbers against the original page yourself. It takes a minute and catches most errors.

6. Locked files

An encrypted or permission-restricted PDF often won’t upload properly, or comes back looking empty. If the document belongs to you, or you’re authorized to open it, remove the protection before analysis and keep the locked original as your master copy.

Where to draw the line isn’t complicated. Unlocking your own payslip or a contract you signed is ordinary admin. Getting around protection on something you have no right to open is a different matter entirely, and no tool changes that.

7. Redaction: do it properly, and do it before anything else

Contracts, bank statements and medical letters tend to contain far more than your question needs. Before any of them goes near a cloud AI service, take out the names, account numbers, addresses and signatures.

Many people get caught out here. A black rectangle drawn over text often hides nothing. In plenty of PDFs, the original words remain underneath, still copyable, still searchable, and perfectly readable by an AI. Proper redaction deletes the content itself. Adobe Acrobat’s Redact tool works this way. In Python, PyMuPDF can do it in a few lines:

python

import fitz  # PyMuPDF

 

doc = fitz.open(“contract.pdf”)

for page in doc:

    for area in page.search_for(“ACC-4471-0098”):

        page.add_redact_annot(area, fill=(0, 0, 0))

    page.apply_redactions()

doc.save(“contract-redacted.pdf”)

Search the new file for the words you removed. If they still show up, something went wrong.

The order matters as well. Redact on your own device first, and only afterwards use web tools or AI services. Online PDF tools differ in how they treat your files. PDFVerge, for example, says most of its tools run entirely in the browser, while a few conversions are processed on its server and deleted once finished. That’s the kind of detail worth checking in any tool’s privacy policy before you hand it something sensitive.

Make the AI show its work

Even with a clean file, the way you ask matters. “Summarize the financials” invites a loose, unverifiable answer. “What was 2025 revenue? Quote the exact line and give the page number” forces the model to anchor itself in the text, and if it can’t point to a source line, you know to be suspicious.

It also helps to say what you don’t want. Adding “if the figure isn’t in the document, say so rather than estimating” noticeably cuts down on invented numbers. It’s a straightforward use of negative prompting that steers models away from filling gaps with guesses.

Behind all of this is a simple fact about language models: they tend to believe whatever text you give them. One journalist got chatbots repeating claims from a single fake web page within about a day. A badly parsed PDF gets much the same treatment, and its errors come back to you in the same confident tone as a correct answer.

Common questions

Q. Can ChatGPT, Claude or Gemini read scanned PDFs?
Often, though, accuracy suffers with small type, tables and handwriting. Running OCR first makes the results far more dependable.

Q. What should I give an AI instead of a PDF?
Clean Markdown or plain text for written content, and CSV or a Markdown table for numbers. That way you know exactly what the model is reading.

Q. Is it safe to upload confidential documents?
Only after real redaction, and only to services whose data policies you’ve actually read.

Q. Why does the AI keep pulling the wrong number from a table?
Most likely the table’s structure broke during text extraction. Pull it out separately and compare the key figures with the original.

FInal Words

AI assistants have become impressively good readers, but they can’t recover text that was never in the file, columns that collapsed into each other, or an account number someone thought was hidden under a black box. Most of the time, a better answer starts with a better file.

Related: iBoomto AI PDF Summarizer Review: Is It Accurate and Worth Using?

Tags: