PDF to Markdown for LLM & RAG (CJK-ready) avatar

PDF to Markdown for LLM & RAG (CJK-ready)

Pricing

from $0.26 / 1,000 page processeds

Go to Apify Store
PDF to Markdown for LLM & RAG (CJK-ready)

PDF to Markdown for LLM & RAG (CJK-ready)

Convert PDFs to clean Markdown, plain text or RAG chunks. Handles two-column papers, running headers/footers, footnotes, and Japanese/Chinese/Korean text including vertical writing. Pay only for successfully processed files.

Pricing

from $0.26 / 1,000 page processeds

Rating

0.0

(0)

Developer

Masahi Shop

Masahi Shop

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 days ago

Last modified

Share

Turn PDF links into clean Markdown, plain text, or ready-to-embed RAG chunks — including documents that most extractors get wrong: two-column papers, Japanese / Chinese / Korean text, and vertical writing (縦書き).

You pay only for PDFs that were processed successfully. Broken links, non-PDF URLs and oversized files are reported but never charged.

What can it be used for?

  • Feed PDFs to ChatGPT, Claude or any LLM without broken line breaks, page numbers and running headers in the middle of sentences.
  • Build a RAG / vector database from reports, manuals or research papers. Each chunk keeps the page numbers it came from, so your app can cite sources.
  • Process Japanese, Chinese and Korean PDFs: lines are joined without inserting spaces between characters, letter-spaced titles are fixed, and chunks end at 。!? sentence endings.
  • Read academic papers: two-column layouts are read column by column, not across.
  • Call it from AI agents via the Apify API or MCP.

Why this Actor?

Problem in typical PDF extractorsWhat this Actor does
Two columns are mixed line by lineDetects the column gutter and reads left column, then right
日本 語 — spaces inserted between CJK characters at line breaksJoins CJK lines without spaces; keeps spaces in English
平 成 2 9 年 letter-spaced headingsCollapses letter-spacing → 平成29年
Vertical Japanese text comes out scrambledReads columns right-to-left, top-to-bottom
Page numbers, running headers and footnote markers inside sentencesRemoves repeated headers/footers and page numbers; footnote markers are dropped and footnotes are kept after the paragraph
A paragraph split by a page break becomes two fragmentsJoins paragraphs across page breaks
Chunks cut in the middle of a word or sentenceSentence-aware chunking with overlap, for both English and CJK

Input

FieldDescription
pdfUrlsList of direct links to PDF files. Only these URLs are downloaded.
outputFormatmarkdown (default), text, or chunks
pageRangee.g. 1-5, 8, 12- (empty = all pages)
chunkSize / chunkOverlapChunk length and overlap in characters (for chunks)
includePagesAlso return each page separately
removeHeadersFootersRemove running headers, footers and page numbers (default on)
normalizeWidthConvert full-width letters/digits ABC123 → ABC123
passwordPassword for encrypted PDFs
maxPagesPerPdf, maxFileSizeMb, downloadTimeoutSecs, maxConcurrencyLimits

Example:

{
"pdfUrls": ["https://arxiv.org/pdf/1706.03762"],
"outputFormat": "chunks",
"chunkSize": 1000,
"chunkOverlap": 100
}

Output

One dataset item per PDF.

{
"url": "https://arxiv.org/pdf/1706.03762",
"fileName": "1706.03762",
"status": "success",
"pageCount": 15,
"processedPages": 15,
"language": "latin",
"hasVerticalText": false,
"likelyScannedPages": [],
"metadata": {
"title": null,
"author": null,
"creator": "LaTeX with hyperref",
"producer": "pdfTeX-1.40.25",
"creationDate": "2024-04-10T21:11:43.000Z",
"pdfVersion": "1.5"
},
"charCount": 39593,
"markdown": "Provided proper attribution is provided, Google hereby grants permission ...\n\n### Attention Is All You Need\n\n...",
"warnings": [],
"processingTimeMs": 15280
}

With outputFormat: "chunks", markdown is replaced by:

"chunkCount": 48,
"chunks": [
{ "index": 0, "pageStart": 1, "pageEnd": 1, "charCount": 852, "text": "Provided proper attribution is provided, ..." }
]

status is one of success, no_text (the PDF contains only images), or failed (with an error message).

Pricing

Pay per event — no subscription, platform usage included:

EventPrice
PDF processed (per successfully processed PDF)$0.003 ($3.00 / 1,000 PDFs)
Page processed (per processed page)$0.0003 ($0.30 / 1,000 pages)
Actor start (per run, Apify standard)$0.00005

Example: a 20-page PDF costs about $0.009.

Failed downloads, non-PDF URLs and files over the size limit are not charged. You can always cap the cost of a run with the maximum charge setting in Apify.

Limitations

  • Scanned PDFs (images only) are not OCR'd. They are reported with status: "no_text" and the page numbers in likelyScannedPages. For those, use OCR Japanese, Chinese, Korean & English.
  • Tables are output as text lines, not as Markdown tables.
  • Headings are detected from font size. Headings that only differ by bold weight are output as normal paragraphs.
  • Layout analysis is heuristic: unusual magazine-style layouts may come out in a slightly different order.

Privacy

The Actor only downloads the URLs you provide. PDF contents are processed in memory and written only to your own run's dataset. Please make sure you have the right to process the documents you submit.