PHPackages                             insightbase/invoice-parser-nette - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. insightbase/invoice-parser-nette

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

insightbase/invoice-parser-nette
================================

Nette package for parsing invoice/accounting documents from PDF (including scanned PDFs) using Azure Document Intelligence, LLM normalization and Czech-specific validation.

v1.0.2(3mo ago)03MITPHPPHP &gt;=8.1CI failing

Since Mar 16Pushed 3mo agoCompare

[ Source](https://github.com/insightbase/InvoiceParser-nette)[ Packagist](https://packagist.org/packages/insightbase/invoice-parser-nette)[ RSS](/packages/insightbase-invoice-parser-nette/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

insightbase/invoice-parser-nette
================================

[](#insightbaseinvoice-parser-nette)

Nette balik pro vytezovani faktur a ucetnich dokladu z PDF (vcetne skenu) pres:

- Azure Document Intelligence (OCR + strukturovana extrakce)
- LLM normalizaci (Azure OpenAI)
- ceske regex fallbacky (`VS`, `DUZP`, `ICO`, `DIC`)
- validacni vrstvu a asynchronni worker pattern

Instalace
---------

[](#instalace)

```
composer require insightbase/invoice-parser-nette
```

Azure setup (API key + endpoint + deployment)
---------------------------------------------

[](#azure-setup-api-key--endpoint--deployment)

Niz je doporuceny postup. Urceno pro stav k 15. 3. 2026.

### 1) Azure ucet a subscription

[](#1-azure-ucet-a-subscription)

1. Vytvor nebo pouzij existujici Azure account.
2. Over, ze mas aktivni subscription a opravneni aspon `Contributor` na resource group.

### 2) Azure Document Intelligence (`azureDi`)

[](#2-azure-document-intelligence-azuredi)

1. V Azure Portal vytvor resource typu `Document Intelligence` (historicky `Form Recognizer`).
2. Vyber region, kde sluzbu chces provozovat.
3. Po vytvoreni otevri `Keys and Endpoint`.
4. Zkopiruj:

- `Endpoint` -&gt; pouzij jako `AZURE_DI_ENDPOINT`
- `Key 1` nebo `Key 2` -&gt; pouzij jako `AZURE_DI_KEY`

### 3) Azure OpenAI (`llm`)

[](#3-azure-openai-llm)

1. V Azure Portal vytvor resource `Azure OpenAI`.
2. V resource otevri `Keys and Endpoint`.
3. Zkopiruj:

- `Endpoint` -&gt; `AZURE_OPENAI_ENDPOINT`
- `Key 1` nebo `Key 2` -&gt; `AZURE_OPENAI_KEY`

4. Otevri Azure AI Foundry / model deployment panel pro tento resource.
5. Vytvor model deployment (napr. GPT model) a zapamatuj `deployment name` -&gt; `AZURE_OPENAI_DEPLOYMENT`.

Poznamka:

- Pokud nejde Azure OpenAI resource nebo deployment vytvorit, jde obvykle o chybejici quota/permission v tenantu nebo regionu. V tom pripade je potreba pozadat Azure admina o povoleni.

### 4) Promenne prostredi

[](#4-promenne-prostredi)

Minimalne nastav:

```
AZURE_DI_ENDPOINT=https://.cognitiveservices.azure.com
AZURE_DI_KEY=
AZURE_OPENAI_ENDPOINT=https://.openai.azure.com
AZURE_OPENAI_KEY=
AZURE_OPENAI_DEPLOYMENT=
```

### 5) Konfigurace extension v Nette

[](#5-konfigurace-extension-v-nette)

```
extensions:
    invoiceParser: InsightBase\InvoiceParserNette\DI\InvoiceParserExtension

invoiceParser:
    azureDi:
        endpoint: %env(AZURE_DI_ENDPOINT)%
        apiKey: %env(AZURE_DI_KEY)%
        model: prebuilt-invoice
        apiVersion: 2023-07-31
        maxPollAttempts: 25
        pollIntervalMs: 1000
    llm:
        enabled: true
        endpoint: %env(AZURE_OPENAI_ENDPOINT)%
        deployment: %env(AZURE_OPENAI_DEPLOYMENT)%
        apiKey: %env(AZURE_OPENAI_KEY)%
        apiVersion: 2024-10-21
```

### 6) Odkazy na oficialni dokumentaci

[](#6-odkazy-na-oficialni-dokumentaci)

- Azure Document Intelligence quickstart:
- Azure OpenAI chat completions quickstart:
- Azure OpenAI role-based access control:

Pouziti
-------

[](#pouziti)

```
