You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 0_Azure/3_AzureAI/14_AIUseCases/1_PDFDocIntelligence/README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -516,19 +516,19 @@ Within the Storage Account, create a Blob Container to store your PDFs.
516
516
517
517
> 1. **PDF Upload**: A PDF is uploaded to the Azure Blob Storage container named `pdfinvoices`.
518
518
> 2. **Trigger Azure Function**: The upload triggers the Azure Function `BlobTriggerContosoPDFInvoicesDocIntelligence`.
519
-
> 3. **Initialize Clients**: Sets up connections to Document Intelligence and Cosmos DB.
520
-
- The function initializes the `DocumentAnalysisClient` to interact with Azure Document Intelligence.
521
-
- It also initializes the `CosmosClient` to interact with Cosmos DB.
519
+
> 3. **Initialize Clients**: Sets up connections to Document Intelligence and Cosmos DB. <br/>
520
+
>- The function initializes the `DocumentAnalysisClient` to interact with Azure Document Intelligence. <br/>
521
+
>- It also initializes the `CosmosClient` to interact with Cosmos DB. <br/>
522
522
> 4. **Read PDF from Blob Storage**: The function reads the PDF content from the Blob Storage into a byte stream.
523
-
> 5. **Analyze PDF**: Uses Document Intelligence to extract data.
524
-
- The function calls the `begin_analyze_document` method of the `DocumentAnalysisClient` using the prebuilt invoice model to analyze the PDF.
525
-
- It waits for the analysis to complete and retrieves the results.
526
-
> 6. **Extract Data**: Structures the extracted data.
527
-
- The function extracts relevant fields from the analysis result, such as customer name, email, address, company name, phone, address, and rental details.
528
-
- It structures this extracted data into a dictionary (`invoice_data`).
529
-
> 7. **Save Data to Cosmos DB**: Inserts the data into Cosmos DB.
530
-
- The function calls `save_invoice_data_to_cosmos` to save the structured data into Cosmos DB.
531
-
- It ensures the database and container exist, then inserts the extracted data.
>- The function calls the `begin_analyze_document` method of the `DocumentAnalysisClient` using the prebuilt invoice model to analyze the PDF. <br/>
525
+
>- It waits for the analysis to complete and retrieves the results. <br/>
526
+
> 6. **Extract Data**: Structures the extracted data. <br/>
527
+
>- The function extracts relevant fields from the analysis result, such as customer name, email, address, company name, phone, address, and rental details. <br/>
528
+
>- It structures this extracted data into a dictionary (`invoice_data`). <br/>
529
+
> 7. **Save Data to Cosmos DB**: Inserts the data into Cosmos DB. <br/>
530
+
>- The function calls `save_invoice_data_to_cosmos` to save the structured data into Cosmos DB. <br/>
531
+
>- It ensures the database and container exist, then inserts the extracted data. <br/>
532
532
> 8. **Logging (process and errors)**: Throughout the process, the function logs various steps and any errors encountered for debugging and monitoring purposes.
0 commit comments