Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/document-extraction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ jobs:
run: dotnet restore DocumentExtraction/DocumentExtraction.slnf --configfile nuget.config
- name: Build
run: dotnet build DocumentExtraction/DocumentExtraction.slnf --no-restore -c Release
- name: Cache ParseBench-2 corpus
uses: actions/cache@v5
with:
path: ${{ runner.temp }}/parsebench-2
key: parsebench-2-${{ hashFiles('DocumentExtraction/test/Corpus/ParseBench-2/corpus.json') }}
- name: Test
env:
DOCUMENT_EXTRACTION_CORPUS_DIR: ${{ runner.temp }}/parsebench-2
run: dotnet test DocumentExtraction/DocumentExtraction.slnf --no-build --no-restore -c Release

package:
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<PackageVersion Include="Azure.AI.DocumentIntelligence" Version="1.0.0" />
<PackageVersion Include="Azure.Core" Version="1.53.0" />
<PackageVersion Include="PdfPig" Version="0.1.15" />
<PackageVersion Include="Tabula" Version="1.0.1" />
</ItemGroup>

<ItemGroup Label="Build">
Expand Down
14 changes: 8 additions & 6 deletions DocumentExtraction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ All packages include **.NET Standard 2.0 and .NET 10** assets. Package IDs start

| Package | Client type | Use when you need | Processing and input |
|---|---|---|---|
| [PdfPig](src/PdfPig/README.md) | `PdfPigDocumentExtractionClient` | Existing PDF text and block geometry without a service | Local; searchable PDFs, no OCR |
| [PdfPig](src/PdfPig/README.md) | `PdfPigDocumentExtractionClient` | Existing PDF text, native tables and block geometry without a service | Local; searchable PDFs, no OCR |
| [AzureContentUnderstanding](src/AzureContentUnderstanding/README.md) | `ContentUnderstandingExtractionClient` | Document text, tables and layout from a Content Understanding analyzer | Azure; analyzer-supported document formats |
| [AzureDocumentIntelligence](src/AzureDocumentIntelligence/README.md) | `DocumentIntelligenceExtractionClient` | OCR, layout, tables and optional figure downloads | Azure; model-supported document formats |
| [Mistral](src/Mistral/README.md) | `MistralDocumentExtractionClient` | Native Mistral OCR page text, tables and images, directly or through Microsoft Foundry | Hosted; endpoint-supported documents and images |
Expand All @@ -23,14 +23,16 @@ Azure and Mistral providers upload document content to the configured service an
can incur charges. Vision Language Model sends original PDF/image bytes to your chosen backend
in one chat request; it does not parse or render PDFs locally. PDF support must
be provided by the configured adapter, API and model, not inferred from image
support. PdfPig reads existing PDF text locally and does not recognize
support. PdfPig reads existing PDF text and tables locally and does not recognize
scanned text. Choose based on document format, required fidelity, latency,
privacy and cost.

This component contains **five providers**. Local model-driven layout, PDF
rasterization and local OCR/table inference are deferred together to a separate
advanced companion; none of those dependencies or model downloads are included
here. The lightweight PdfPig provider remains a native-text parser, not OCR.
rasterization and local OCR or image-based table recognition are deferred
together to a separate advanced companion; none of those dependencies or model
downloads are included here. The lightweight PdfPig provider remains a
native-text parser, not OCR; it detects tables from the PDF's native lines and
text positions.

These are preview packages using experimental contracts. Their core
dependencies are available from NuGet.org.
Expand Down Expand Up @@ -318,7 +320,7 @@ void PrintElement(ExtractionDocumentElement element)
}
```

Source capabilities vary: PdfPig supplies PDF block geometry; Azure services
Source capabilities vary: PdfPig supplies PDF block, table and cell geometry; Azure services
supply their reported regions; Vision Language Model supplies model-reported source associations rather than
measured paragraph polygons. Check for data instead of assuming every provider
supplies the same level of detail.
Expand Down
5 changes: 3 additions & 2 deletions DocumentExtraction/src/PdfPig/PdfPig.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.0-preview</Version>
<Version>1.1.0-preview</Version>
<AssemblyName>CommunityToolkit.DocumentExtraction.PdfPig</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
<Title>PdfPig document extraction provider</Title>
<Description>Native PDF text extraction for Microsoft.Extensions.DocumentExtraction.</Description>
<Description>Native PDF text and table extraction for Microsoft.Extensions.DocumentExtraction.</Description>
</PropertyGroup>
<ItemGroup>
<None Remove="skills\ctk-document-extraction-pdfpig\SKILL.md" />
<None Include="skills\ctk-document-extraction-pdfpig\SKILL.md" Pack="true" PackagePath="skills\ctk-document-extraction-pdfpig\" />
<PackageReference Include="PdfPig" />
<PackageReference Include="Tabula" />
<InternalsVisibleTo Include="$(AssemblyName).UnitTests" />
</ItemGroup>
</Project>
Loading
Loading