# PDF Reading Order Debugger

Compare raw PDF draw order against XY-Cut++ reading order to spot multi-column and layout-related extraction issues

> Canonical page: https://elysiatools.com/en/tools/pdf-reading-order-debugger

- **Category:** Developer Tools

- **Keywords:** pdf, reading order, xycut, debugger, layout

## Overview

Run the same PDF through OpenDataLoader with readingOrder=off and readingOrder=xycut, then inspect the per-page text difference. This is useful for multi-column reports, scientific papers, brochures, and any layout where plain text draw order may scramble reading flow.

## Inputs

- **PDF File** (file)
- **Use Struct Tree** (checkbox)
- **Include Header/Footer** (checkbox)
- **Pages** (text): e.g. 1,3,5-7

## When to use

- When extracted text from multi-column reports or academic papers appears out of order.
- Before configuring RAG pipelines to ensure document context and citations remain logically sequenced.
- When debugging whether structural tags or layout-aware algorithms are necessary for a specific set of documents.

## How it works

- Upload your PDF file and optionally specify a page range to limit the analysis.
- The tool processes the document twice: once using the raw draw order and once using the XY-Cut++ layout-aware algorithm.
- It compares the results per page to detect differences in text sequencing and block identification.
- An interactive HTML report is generated, visualizing the reading order differences to help you choose the best extraction settings.

## Use cases

- Validating the extraction logic for two-column scientific journals to prevent sentence fragmentation.
- Optimizing financial report processing by identifying where sidebars interfere with table data.
- Troubleshooting layout-related extraction errors in brochures and marketing materials with non-linear text flows.

## Frequently asked questions

### What is XY-Cut++?

It is a layout-analysis algorithm that recursively partitions a page into horizontal and vertical blocks to determine the correct human reading sequence.

### Why does the raw draw order often look scrambled?

PDFs store text based on the order it was added to the file, which frequently differs from the visual layout of columns and sidebars.

### Can I test how headers and footers affect extraction?

Yes, you can toggle the 'Include Header/Footer' option to see if these elements disrupt the main content flow.

### What does the 'Use Struct Tree' option do?

It attempts to use the internal structural tags (if present in the PDF) to determine the reading order instead of relying solely on visual layout.

### What format is the final report?

The tool outputs an HTML file that provides a visual comparison of the text order differences for every processed page.

## Related tools

- [Formula / Chart Heavy PDF Analyzer](https://elysiatools.com/en/tools/formula-chart-heavy-pdf-analyzer): Compare local and hybrid OpenDataLoader extraction to identify PDF pages where formulas, charts, or dense visuals may need AI-assisted parsing
- [PDF Header/Footer Noise Remover](https://elysiatools.com/en/tools/pdf-header-footer-noise-remover): Compare extraction with and without repeated page furniture to spot header/footer noise before using PDF text in RAG, summarization, or editing workflows
- [Tagged PDF Inspector](https://elysiatools.com/en/tools/tagged-pdf-inspector): Compare StructTree-enabled and plain PDF extraction to see whether a document behaves like a tagged PDF and how much semantic structure it exposes
- [PDF to JSON Structure Explorer](https://elysiatools.com/en/tools/pdf-to-json-structure-explorer): Extract structured OpenDataLoader JSON from a PDF and browse headings, paragraphs, tables, lists, pages, and bounding boxes in an explorer view
- [OCR PDF to Structured JSON Bridge](https://elysiatools.com/en/tools/ocr-pdf-to-structured-json-bridge): Extract the PDF text layer with geometry (lines by y-position, tables by column gaps, headings by font size, colon key-value pairs), then fill a user-supplied JSON Schema field by field — labels matched by normalized keys, values coerced to declared types and validated with ajv.
- [PDF Prompt Injection Scanner](https://elysiatools.com/en/tools/pdf-prompt-injection-scanner): Compare safe and unsafe PDF extraction runs to detect hidden text, off-page content, tiny text, and hidden-layer prompt injection risks
- [PDF to Markdown Converter](https://elysiatools.com/en/tools/pdf-to-markdown): Convert PDF documents to Markdown format with text extraction and formatting preservation
- [PDF to Text Advanced](https://elysiatools.com/en/tools/pdf-to-text-advanced): Advanced PDF to text converter with page selection, formatting options, and metadata extraction

## Samples

- [PDF Samples](https://elysiatools.com/en/samples/pdf-samples): Generated PDF samples from tools dated 2026-02-01 to 2026-02-10
- [Markdown Slide Deck Samples](https://elysiatools.com/en/samples/md-slide-deck-to-pdf): Remark/Marp style Markdown slide decks for testing PDF export layouts
- [Time Zone Workflow Scheduler ICS Samples](https://elysiatools.com/en/samples/time-zone-workflow-scheduler-ics-samples): ICS files generated in the same structure returned by the Time Zone Workflow Scheduler, with multiple VEVENT meeting candidates exported from overlap windows
- [OFD Samples](https://elysiatools.com/en/samples/ofd-samples): Sample OFD (Open Fixed-layout Document) files for GB/T 33190 parsing and preview tests

## Related content

- [PDF Extraction and Debugging Workflows](https://elysiatools.com/en/hubs/pdf-extraction-debugging-workflows): Debug hard PDF extraction cases by checking encryption, safety, page scope, reading order, OCR, tables, review marks, and structured output.
