Orchardcore ai documents extractors

From CrestApps/CrestApps.AgentSkills · View interactive version

Orchardcore ai documents extractors is an AI agent skill from the GitHub repository CrestApps/CrestApps.AgentSkills. Skill for adding PDF and OpenXml text extraction to CrestApps Orchard Core AI Documents. Covers PDF, DOCX, XLSX, PPTX, processor registration, the PowerPoint, Word and PDF system agents, supported file types, upload processing, and extraction troubleshooting. Use this skill when requests mention AI

How to use this skill

Skill file

Orchard Core AI Documents PDF and OpenXml Extractors

Configure document text extraction

You are an Orchard Core expert. Add optional PDF and Microsoft Open XML document

extractors to the CrestApps AI Documents processing pipeline. Enable only the file

format support required by the application, then combine it with a document context

and optional vector indexing backend.

Guidelines

Feature overview

| Feature ID | Registration | File support |

|---|---|---|

| CrestApps.OrchardCore.AI.Documents.Pdf | AddCoreAIPdfDocumentProcessing | .pdf |

| CrestApps.OrchardCore.AI.Documents.OpenXml | AddCoreAIOpenXmlDocumentProcessing, AddCoreAIWordDocumentProcessing | .docx, .xlsx, .pptx |

The PDF module uses PdfPig as an IngestionDocumentReader. The OpenXml module uses

the Microsoft DocumentFormat.OpenXml SDK to extract supported Office document text.

Document agents

Both features also bring system agents that work on documents inside a conversation.

They are always available to the primary model and do not appear in agent pickers.

| Agent | Feature | What it does |

|---|---|---|

| PowerPoint | CrestApps.OrchardCore.AI.Documents.OpenXml | Creates, edits, designs, reviews, previews, and exports .pptx decks. Exporting a deck as PDF also needs CrestApps.OrchardCore.AI.Documents.Pdf. |

| Word | CrestApps.OrchardCore.AI.Documents.OpenXml (AddCoreAIWordDocumentProcessing) | Writes, edits, reviews, previews, and exports .docx documents. |

| PDF | CrestApps.OrchardCore.AI.Documents.Pdf | Creates, converts, edits, previews, and analyses PDFs. |

Previews come back as images, which the chat UI shows in its image carousel.

Enable both extractors

{
  "steps": [
    {
      "name": "Feature",
      "enable": [
        "CrestApps.OrchardCore.AI.Documents.ChatInteractions",
        "CrestApps.OrchardCore.AI.Documents.AzureAI",
        "CrestApps.OrchardCore.AI.Documents.Pdf",
        "CrestApps.OrchardCore.AI.Documents.OpenXml"
      ],
      "disable": []
    }
  ]
}

This recipe enables a document context, Azure AI Search indexing, and both optional

extractors. Replace the Azure AI Search feature with

CrestApps.OrchardCore.AI.Documents.Elasticsearch when Elasticsearch is the selected

vector backend.

Supported files

| Format | Extension | Extraction behavior |

|---|---|---|

| PDF | .pdf | Reads text page by page. |

| Word | .docx | Reads paragraphs from the main document body. |

| Excel | .xlsx | Reads rows and cells into the tabular workspace; it is a tabular, non-embeddable document. |

| PowerPoint | .pptx | Reads text elements across slides. |

The following legacy binary formats are not supported:

Convert those files to .docx, .xlsx, or .pptx before upload. Plain-text

formats supported by the base document pipeline do not require either feature.

Processing flow

  1. The user uploads an allowed document through Chat Interactions, Profiles, or Chat Sessions.
  2. AI Documents selects a registered reader matching the document type.
  3. The PDF or OpenXml processor extracts plain text.
  4. For embeddable documents, the core pipeline stores chunks and generates embeddings when a configured index requires them.
  5. Azure AI Search or Elasticsearch indexes embeddable chunks for filtered vector retrieval. CSV and Excel are instead queried through the conversation's tabular-data tools.

Enabling these modules after files already failed extraction does not automatically

repair earlier uploads. Re-upload or reprocess them using the normal document workflow.

PDF guidance

PdfPig extracts textual PDF content without external native dependencies and works

cross-platform. It cannot reliably OCR scanned documents that contain only images.

For scanned content, run OCR before upload or add a separate OCR stage that produces

searchable text.

Complex multi-column layouts, tables, and positioned text may extract in an order that

does not match visual reading order. Test representative documents and tune source

documents or preprocessing where answer quality depends on layout.

OpenXml guidance

Word extraction targets paragraphs in the main body. Excel extraction is row-based and

loads cells into the tabular workspace for tabular-data tools. PowerPoint extraction covers text elements on slides.

Embedded images, macros, complex charts, and visual formatting are not semantic text

and should not be assumed to become RAG context.

Use current zipped Open XML files. A filename extension alone is not a guarantee that

the content is a valid .docx, .xlsx, or .pptx package.

Package installation

dotnet add package CrestApps.OrchardCore.AI.Documents.Pdf
dotnet add package CrestApps.OrchardCore.AI.Documents.OpenXml

Add the packages to the host web or startup project. Enabling a feature cannot load a

package that was not deployed with the application.

Troubleshooting

| Symptom | Check |

|---|---|

| PDF upload has no extracted context | Enable the PDF feature, confirm the file contains selectable text, then re-upload or reprocess it. |

| Word, Excel, or PowerPoint file is unsupported | Enable the OpenXml feature and use .docx, .xlsx, or .pptx, not a legacy binary format. |

| Scanned PDF has empty text | PdfPig is not OCR. Use OCR before processing image-only pages. |

| Spreadsheet answers miss labels | Verify labels are actual cell values, then inspect the tabular workspace metadata and query the table with tabular-data tools. |

| Presentation answer misses visual content | Only text elements are extracted; put critical content in text or add a dedicated extraction process. |

| Extraction succeeds but queries find nothing | Configure an embedding deployment and an active Azure AI Search or Elasticsearch document index. |

| Feature is enabled but no reader runs | Verify the deployed package, exact feature ID, detected MIME type, and that the upload reaches an AI Documents context. |

Security and operational notes

Pre-production verification

Before enabling the extractors for users:

  1. Upload a text-based PDF and confirm extracted text answers a document query.
  2. Upload representative .docx, .xlsx, and .pptx files and validate the

extracted business text is intelligible.

  1. Verify a scanned PDF is rejected, OCR-preprocessed, or clearly documented as

unsupported for semantic extraction.

  1. Confirm unsupported legacy formats fail with an actionable upload message rather

than silently producing empty RAG context.

  1. Test deletion and re-upload flows to ensure stale chunks from an earlier document

version cannot affect new responses.

  1. Test an indexing failure separately from extraction to identify whether the issue is in file ingestion, embedding generation, or the selected index backend.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.