---
title: "What files are produced in the OCR output folder?"
description: "The output naming rules and directory structure, where embedded images go, and every field in the YAML frontmatter at the top of each Markdown file"
canonical_url: "https://docs.ardge.com/en/knowledge/precisemd/ocr-output-files"
---
# What files are produced in the OCR output folder?

> The output naming rules and directory structure, where embedded images go, and every field in the YAML frontmatter at the top of each Markdown file

## Short answer

An OCR task produces one Markdown file and one page image per page of the source document, named with the source file name as a prefix plus a three-digit page number. Images embedded in a page go into an `imgs/` folder alongside them. Every Markdown file opens with a YAML frontmatter block recording the source file, page number, processing time, and content hash.

## Details

### Naming rules

Output file names use the source file name as a prefix, with the extension's dot replaced by an underscore. A source of `report.pdf` gives the prefix `report_pdf`:

<table>
<thead>
  <tr>
    <th>
      Source
    </th>
    
    <th>
      Output
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        report.pdf
      </code>
      
       page 1
    </td>
    
    <td>
      <code>
        report_pdf_page_001.md
      </code>
      
      , <code>
        report_pdf_page_001.jpg
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        report.pdf
      </code>
      
       page 12
    </td>
    
    <td>
      <code>
        report_pdf_page_012.md
      </code>
      
      , <code>
        report_pdf_page_012.jpg
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        invoice.png
      </code>
    </td>
    
    <td>
      <code>
        invoice_png_page_001.md
      </code>
      
      , <code>
        invoice_png_page_001.jpg
      </code>
    </td>
  </tr>
</tbody>
</table>

Page numbers are three digits, zero-padded, so several source files can share one output folder without their names colliding.

### Directory structure

The output folder mirrors the source folder's subdirectory structure. A source file at `2026/Q1/report.pdf` writes its output to `<OCR output folder>/2026/Q1/`.

Images extracted from a page go into an `imgs/` subfolder under that output directory, referenced from the Markdown by a relative path starting with `imgs/`. That folder is created the first time an embedded image is written — a document with no embedded images produces no `imgs/`.

The full output structure for one `report.pdf`:

```text
<OCR output folder>/
├── report_pdf_page_001.md
├── report_pdf_page_001.jpg
├── report_pdf_page_002.md
├── report_pdf_page_002.jpg
└── imgs/
    └── <embedded image file name>
```

<warning>

**Office formats produce no page images:**

DOCX, XLSX, and PPTX go through the conversion pipeline, which produces only the `.md` file per page — no `.jpg` page image.

</warning>

### The YAML frontmatter at the top of the Markdown

Each `.md` file opens with a YAML frontmatter block fenced by `---`, with the fields always in this order:

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      What it holds
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        source_file
      </code>
    </td>
    
    <td>
      The source file's path relative to the source folder
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        source_format
      </code>
    </td>
    
    <td>
      The source file's extension without the dot — for example <code>
        pdf
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        page_number
      </code>
    </td>
    
    <td>
      The page this file corresponds to
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        total_pages
      </code>
    </td>
    
    <td>
      The source document's total page count
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        processed_at
      </code>
    </td>
    
    <td>
      When processing finished, in ISO 8601 format
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ocr_engine
      </code>
    </td>
    
    <td>
      The engine that processed the file: <code>
        arcor
      </code>
      
       for the OCR pipeline, <code>
        docling-serve
      </code>
      
       for the conversion pipeline
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pipeline_version
      </code>
    </td>
    
    <td>
      The PreciseMD version at processing time
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        enable_vlm
      </code>
    </td>
    
    <td>
      Whether vision correction was on — <code>
        true
      </code>
      
       or <code>
        false
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        file_hash
      </code>
    </td>
    
    <td>
      The hash of the source file's content
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        file_hash_algorithm
      </code>
    </td>
    
    <td>
      The hash algorithm, currently <code>
        sha256
      </code>
    </td>
  </tr>
</tbody>
</table>

### What `file_hash` is for

The system tracks processed files by their source path and `file_hash`. On a later run, a file whose hash matches the record is skipped: its status in **File details** reads **Skipped** with **Content unchanged** in the notes, and the existing output files are left as they are.

## Related articles

- [Schedule an OCR task to process a folder automatically](https://docs.ardge.com/en/knowledge/precisemd/schedule-ocr-tasks)
- [Check OCR task history and troubleshoot failed files](https://docs.ardge.com/en/knowledge/precisemd/ocr-task-history)
- [When should I enable vision correction?](https://docs.ardge.com/en/knowledge/precisemd/vision-correction)


## Sitemap

See the full [sitemap](https://docs.ardge.com/sitemap.md) for all pages.
