# Prepare PDFs for RAG with pdfRest OCR and Markdown chunks

> Quick overview Prepare PDFs for RAG with a low-code workflow that extracts Markdown, applies OCR when needed, and creates page-referenced text chunks. Resume processing from checkpoints, review flagged pages, and download the results before indexing in your chosen system. How it works 1. Receives a PDF (and optional prior checkpoint.json), OCR strategy, and optional page exclusions through an n8n form. 2. Validates file size/type, exclusion input, and (if provided) verifies the checkpoint matches the same PDF and extraction settings. 3. Uses pdfRest PDF Info to read the PDF page count and confirm the document is not password-protected. 4. Selects up to a configured batch of unprocessed pages (reusing READY pages from the checkpoint and skipping excluded pages) and processes them one page at a time. 5. Reads each page as Markdown and checks for sparse or damaged text. Auto mode applies OCR when needed; Force mode applies OCR to every selected page before extracting Markdown. 6. Builds a

- **Domain**: `n8n-workflow-21485.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/21485
- Page (HTML): https://agenstry.com/agents/n8n-workflow-21485.n8n.io
- Documentation: https://n8n.io/workflows/21485
