top of page

DeepSeek PDF reading: text extraction, scanned PDFs, API workarounds, and practical limits

Jan 23
3 min read

Updated: Sep 16

DeepSeek can work with PDF-derived content, but the current product needs an important distinction: the consumer app advertises file upload and text extraction, while the public developer Files API is currently image-only. There is no generic PDF file input in the public Responses API either. A reliable PDF workflow therefore depends on whether the user is working inside DeepSeek's consumer interface or building an API integration.

For developers, two robust paths exist: extract the PDF's text before calling the model, or render the relevant pages as supported image formats and send them to deepseek-flash. The first preserves textual efficiency; the second preserves visual evidence such as charts, page geometry, handwriting, stamps, or scanned text.

··········

CONSUMER PDF READING AND API PDF PROCESSING ARE DIFFERENT WORKFLOWS

DeepSeek's consumer product has long included file upload and text extraction. Its current public API documentation, however, defines Files API uploads as JPEG, PNG, GIF, and WebP. Developers should therefore avoid copying consumer-interface assumptions into code and should treat PDF preprocessing as an application responsibility unless DeepSeek publishes a dedicated document endpoint.

........

PDF workflow

Recommended path

Strength

Trade-off

Digital text PDF

Extract text, then send text

Efficient and searchable

Layout can be flattened

Scanned PDF

Render pages to images

Preserves visual text

Higher vision-token usage

Charts/forms

Send selected pages as images

Keeps spatial evidence

Requires page selection

Mixed report

Text extraction + targeted page images

Best coverage

More orchestration

........

··········

TEXT EXTRACTION IS USUALLY THE CHEAPEST PATH FOR DIGITAL PDFS

When a PDF already contains a usable text layer, extracting that text before the API call avoids paying vision tokens for every page and makes chunking, indexing, retrieval, and quote verification easier. The application can preserve page markers during extraction so answers can still point back to the source page.

··········

SCANNED PDFS REQUIRE OCR OR PAGE-IMAGE ANALYSIS

A scanned PDF contains page images rather than clean selectable text. The application can run OCR before calling DeepSeek, or render pages directly to JPEG/PNG and rely on deepseek-flash vision to read the visible content. The vision route is useful when OCR alone would discard visual structure, but critical numbers should still be checked against the original scan.

··········

THE PUBLIC FILES API CANNOT BE USED AS A GENERIC PDF STORE

The current Files API supports JPEG, PNG, GIF, and WebP. It allows 64 MiB per stored image, 25 GiB per user, and up to 10,000 files, but those limits should not be quoted as PDF-upload limits. A PDF must first be transformed into model-compatible text or images for the public API workflow.

··········

A 100-PAGE PDF CAN FIT THE IMAGE-COUNT LIMIT BUT STILL CONSUME SUBSTANTIAL CONTEXT

Data Studios calculation: if 100 rendered PDF pages each reached DeepSeek's published maximum of 1,024 image tokens, the pages alone would represent roughly 102,400 image tokens. That is below the 600-image request-count ceiling and well below a 1M context in token terms, but byte limits, page dimensions, accompanying text, and output requirements still need to be managed.

........

Rendered PDF pages

Max image tokens at 1,024/page

Share of 1M context before text/output

25

25,600

2.6%

50

51,200

5.1%

100

102,400

10.2%

300

307,200

30.7%

........

··········

TABLES AND MULTI-COLUMN PAGES SHOULD BE VERIFIED STRUCTURALLY

Extracted PDF text often loses the two-dimensional relationships that make tables, forms, and multi-column pages understandable. For those pages, a hybrid workflow is stronger: send extracted text for search and reasoning, then provide the relevant page image when the answer depends on column alignment, labels, footnotes, signatures, or chart geometry.

··········

PDF WORKFLOWS SHOULD PRESERVE PAGE REFERENCES BEFORE CHUNKING

When a long PDF is split into chunks, keep page numbers and section labels in the extracted text. That simple step makes later validation much easier and prevents the final answer from becoming detached from the source document. For financial, legal, or regulatory use, each high-impact conclusion should be traceable back to the page or table that produced it.

··········

DEEPSEEK PDF ANALYSIS IS STRONGEST WHEN TEXT AND VISION ARE COMBINED SELECTIVELY

The current API architecture favors a hybrid design rather than blindly sending every page as an image. Extract ordinary text, reserve vision for pages where layout carries meaning, and use file_id only for the image assets that benefit from reuse. That approach is cheaper, easier to audit, and better aligned with DeepSeek's published interfaces.

··········

FOLLOW US FOR MORE

··········

DATA STUDIOS

··········

datastudios.org

bottom of page