# High-Precision PDF Extraction without OCR Artifacts

Category: Retrieval & Pipelines
Stack: LlamaParse, LiteParse, Markdown Converters

## Overview
Converting complex documents into clean markdown tables while preserving column alignment and eliminating PDF control characters.

## The Problem
Standard PDF parsers output unformatted strings that strip column groupings, creating broken tables and numeric errors in downstream vector retrieval.

## Production Rule
Use specialized structural parsers that output native Markdown tables. Tag chunks with source, date, author, and content hashes at ingest for idempotent pipeline updates.

## Code / Specification
File: `ingest_pdf_markdown.py`

```data ingestion
from llama_parse import LlamaParse

parser = LlamaParse(
    result_type="markdown",
    verbose=True,
    language="en",
    split_by_page=True,
)

# Returns page chunks formatted strictly as markdown with preserved tables
documents = parser.load_data("financial_report.pdf")
for doc in documents:
    assert "| --- |" in doc.text or len(doc.text) < 100 # Verify tabular preservation
```
