# PDFCraft OCR Converter & Translator (`beingswu/pdfcraft-ocr-converter`) Actor

Official Apify Actor for PDFCraft (https://pdfcraft.ai), backed by the open-source GitHub project with 6,800+ stars (github.com/oomol-lab/pdf-craft). Convert scanned PDFs to Markdown or EPUB with LaTeX and table OCR, or translate books in 22 languages.

- **URL**: https://apify.com/beingswu/pdfcraft-ocr-converter.md
- **Developed by:** [Shaun Wu](https://apify.com/beingswu) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 pdf pages ocr conversion

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## PDFCraft OCR Converter & Translator

Official Apify Actor for **[PDFCraft](https://pdfcraft.ai)** (`https://pdfcraft.ai`), backed by the MIT-licensed open-source GitHub project **[oomol-lab/pdf-craft](https://github.com/oomol-lab/pdf-craft)** (**6,800+ GitHub stars**), built by [OOMOL](https://oomol.com).

Use this Actor to convert scanned or layout-heavy PDFs into clean, structured **Markdown** or **EPUB** with OCR (preserving reading order, tables, LaTeX math formulas, and footnotes), or translate full PDF and EPUB books across **22 languages** in replace or bilingual layouts — with zero local GPU or Python setup.

### What is PDFCraft? (Official Website & Open-Source GitHub)

**PDFCraft** is an AI-native document conversion and translation project focused on turning hard-to-parse PDFs (scanned books, multi-column research papers, textbooks, technical manuals, and foreign-language books) into clean digital formats ready for reading, RAG, and AI agents.

- **Official Website (`pdfcraft.ai`)**: <https://pdfcraft.ai> — Online workspace, hosted cloud API, and native remote MCP server.
  - [PDF to Markdown converter](https://pdfcraft.ai/pdf-to-markdown/) — Scanned and layout-heavy PDF to structured Markdown with LaTeX and tables
  - [PDF OCR online](https://pdfcraft.ai/ocr-pdf/) — Layout-aware OCR with reading-order reconstruction and footnote handling
  - [PDF translator](https://pdfcraft.ai/pdf-translator/) and [EPUB book translator](https://pdfcraft.ai/epub-translator/) — Full-book translation in 22 languages with replace or bilingual layouts
  - [PDFCraft Open Source overview](https://pdfcraft.ai/open-source/) — Architecture and self-hosting guide
- **Open-Source GitHub Repository (`oomol-lab/pdf-craft`, 6,800+ stars)**: <https://github.com/oomol-lab/pdf-craft> — MIT-licensed Python package (`pip install pdf-craft`) supporting local NVIDIA GPU OCR or remote vendor OCR backends, streaming extraction, and custom layout pipelines.
- **Developer Interfaces**:
  - [PDFCraft REST API documentation](https://pdfcraft.ai/docs/api/overview/) and [OpenAPI 3.0 specification](https://pdfcraft.ai/openapi.json)
  - [PDFCraft Remote MCP setup guide](https://pdfcraft.ai/connect/) (`https://api.pdfcraft.ai/v1/mcp`, Streamable HTTP with OAuth 2.1 or Bearer API key)

### Core Capabilities

- **Scanned & Complex PDF to Markdown (OCR)**: Reconstructs logical reading order across multi-column pages, merges cross-page paragraphs, removes running headers and footers, preserves tables and LaTeX math formulas, unpacks the Markdown directly into the Apify Dataset, and saves the full ZIP archive (with extracted images) in the Key-Value Store.
- **PDF to Reflowable EPUB**: Converts fixed-layout PDF books and academic papers into clean EPUB files for e-readers and downstream text pipelines.
- **Full-Document PDF & EPUB Translation (22 Languages)**: Translates complete PDF or EPUB documents into `replace` (translated text only), `bilingual` (block-by-block), or `bilingual-inline` layouts, with optional glossary and terminology instructions via `translationPrompt`.
- **Refined Layout & Footnote Extraction**: Optional `refinement_with_footnotes` mode improves complex academic layouts and extracts footnotes cleanly.
- **AI Agent, RAG & MCP Ready**: Integrate directly via the Apify API, n8n, Make, Zapier, LangChain, or the [Apify MCP Server](https://mcp.apify.com/?tools=beingswu/pdfcraft-ocr-converter).

### Comparing PDFCraft Deployment Options

| Option | Best for | Link |
| --- | --- | --- |
| **PDFCraft Apify Actor (this Actor)** | Zero-setup cloud runs, n8n/Make automation, and AI agents via Apify MCP | `beingswu/pdfcraft-ocr-converter` |
| **PDFCraft Website, REST API & Remote MCP** | Interactive online conversion, direct API integration, or OAuth remote MCP (`https://api.pdfcraft.ai/v1/mcp`) | <https://pdfcraft.ai> |
| **Open-Source Self-Hosted (`pdf-craft`)** | Offline/air-gapped privacy, local NVIDIA CUDA GPU servers, or custom Python workflows (`pip install pdf-craft`) | <https://github.com/oomol-lab/pdf-craft> |

### Supported Format Combinations

| Input | Output | Translation | Layout modes |
| --- | --- | --- | --- |
| PDF | Markdown (`.zip` + dataset text) | Optional | `source` (no translation), `replace`, `bilingual`, `bilingual-inline` |
| PDF | EPUB (`.epub`) | Optional | `source` (no translation), `replace`, `bilingual`, `bilingual-inline` |
| PDF | PDF (`.pdf`) | Required | `replace` |
| EPUB | EPUB (`.epub`) | Required | `replace`, `bilingual`, `bilingual-inline` |

Supported `targetLanguage` codes: `en`, `zh-CN`, `ja`, `ko`, `de`, `fr`, `es`, `it`, `pt`, `ru`, `ar`, `hi`, `nl`, `pl`, `tr`, `vi`, `th`, `id`, `sv`, `da`, `no`, `fi`.

### Input Examples

Convert a scanned or layout-heavy PDF into structured Markdown:

```json
{
  "fileUrls": [
    "https://pdfcraft.ai/examples/api-quickstart.pdf"
  ],
  "outputFormat": "markdown",
  "refinement": "disabled",
  "includeMarkdownContent": true
}
```

Translate a PDF paper into a bilingual English and Chinese EPUB with footnote extraction:

```json
{
  "fileUrls": [
    "https://example.com/paper.pdf"
  ],
  "outputFormat": "epub",
  "targetLanguage": "zh-CN",
  "renderingMode": "bilingual",
  "refinement": "refinement_with_footnotes",
  "translationPrompt": "Keep model names and benchmark acronyms in English."
}
```

### Output Example

Each processed document is stored in the default **Dataset**, and the full binary output (`.zip`, `.epub`, or `.pdf`) is stored in the run's **Key-Value Store**:

```json
{
  "sourceUrl": "https://pdfcraft.ai/examples/api-quickstart.pdf",
  "inputFormat": "pdf",
  "outputFormat": "markdown",
  "renderingMode": "source",
  "refinement": "disabled",
  "status": "succeeded",
  "taskUuid": "8ae07e41-6e94-4144-9562-5af4116cba7e",
  "title": "Paper to structured text",
  "authors": [],
  "detectedLanguage": "en",
  "processedPages": 1,
  "outputFileKey": "output-1-8ae07e41.zip",
  "outputFileUrl": "https://api.apify.com/v2/key-value-stores/.../records/output-1-8ae07e41.zip",
  "outputFileSizeBytes": 4820,
  "markdown": "# Sample Paper\n\nPaper to structured text.",
  "markdownFiles": ["document.md"],
  "assetCount": 0
}
```

### Pricing

When running with Apify managed billing (no external API key required, platform compute costs included), you pay strictly per processed page or per 1,000 source words via Apify Pay-Per-Event:

- **PDF page OCR conversion** (`pdf-page-converted`): $0.015 per page ($15.00 / 1,000 pages)
- **Refined PDF page OCR with footnotes** (`pdf-page-refined`): $0.045 per page ($45.00 / 1,000 pages)
- **PDF page translation** (`pdf-page-translated`): $0.015 per page in addition to extraction
- **EPUB translation** (`epub-1k-words-translated`): $0.050 per 1,000 source words

### Frequently Asked Questions

#### Where is the PDFCraft open-source GitHub repository?

PDFCraft is open-sourced under the MIT license at <https://github.com/oomol-lab/pdf-craft>. You can install it locally with `pip install pdf-craft` or run it offline on NVIDIA GPUs with `pip install "pdf-craft[local]"`.

#### Where can I use PDFCraft online or connect via MCP?

Visit the official website at <https://pdfcraft.ai> to convert and translate documents in your browser, generate API keys at <https://pdfcraft.ai/api-keys>, or connect AI clients like Claude, Cursor, VS Code, and Codex to the remote MCP server (`https://api.pdfcraft.ai/v1/mcp`) via <https://pdfcraft.ai/connect/>.

#### How do I connect this Apify Actor via MCP?

Point any MCP-compatible client to `https://mcp.apify.com/?tools=beingswu/pdfcraft-ocr-converter` using your Apify account.

# Actor input Schema

## `fileUrls` (type: `array`):

Direct HTTP/HTTPS links to the PDF or EPUB files you want to convert or translate.

## `outputFormat` (type: `string`):

Target format. PDF input supports Markdown, EPUB, or translated PDF. EPUB input supports translated EPUB.

## `targetLanguage` (type: `string`):

Leave empty to keep the original language. Required when converting PDF to PDF or translating EPUB to EPUB.

## `renderingMode` (type: `string`):

Applies only when a target language is selected. PDF output only supports Replace.

## `refinement` (type: `string`):

Applies to PDF input only. Refined mode improves complex academic or book layouts and extracts footnotes.

## `translationPrompt` (type: `string`):

Optional glossary, terminology, or style instructions used only when translating.

## `includeMarkdownContent` (type: `boolean`):

When output format is Markdown, unpack the ZIP archive and store the Markdown text directly in each dataset item.

## `maxWaitSeconds` (type: `integer`):

Maximum time in seconds to wait for each PDFCraft conversion job to complete.

## `pdfcraftApiKey` (type: `string`):

Leave empty to run with Apify managed billing. Only provide your own key from pdfcraft.ai/api-keys if you prefer using your personal PDFCraft balance.

## Actor input object example

```json
{
  "fileUrls": [
    "https://pdfcraft.ai/examples/api-quickstart.pdf"
  ],
  "outputFormat": "markdown",
  "targetLanguage": "",
  "renderingMode": "",
  "refinement": "disabled",
  "includeMarkdownContent": true,
  "maxWaitSeconds": 600
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fileUrls": [
        "https://pdfcraft.ai/examples/api-quickstart.pdf"
    ],
    "outputFormat": "markdown"
};

// Run the Actor and wait for it to finish
const run = await client.actor("beingswu/pdfcraft-ocr-converter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "fileUrls": ["https://pdfcraft.ai/examples/api-quickstart.pdf"],
    "outputFormat": "markdown",
}

# Run the Actor and wait for it to finish
run = client.actor("beingswu/pdfcraft-ocr-converter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fileUrls": [
    "https://pdfcraft.ai/examples/api-quickstart.pdf"
  ],
  "outputFormat": "markdown"
}' |
apify call beingswu/pdfcraft-ocr-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,beingswu/pdfcraft-ocr-converter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/EY6QehgI44JEB3Jn1/builds/OJpGj3ydT2NDNkheR/openapi.json
