Add ZUGFeRD Guideline-ID extraction and display

Enhanced `PdfExtractionResult` with a new `ZugferdGuidelineId` property to store the ZUGFeRD Guideline-ID extracted from XMP metadata. Updated `Upload.cshtml` to display this information in the UI if available.

Implemented ZUGFeRD Guideline-ID extraction in `PdfAttachmentExtractorService` using a new helper method `ExtractGuidelineId`, which parses XMP metadata for known prefixes. Added logging for extracted Guideline-IDs and improved error handling with a `try-catch` block for metadata processing.

Fixed `FileAttachments` handling in `PdfAttachmentExtractorService` by converting to `List<T>` for proper `Count` property usage.
This commit is contained in:
OlgunR
2026-05-26 17:05:52 +02:00
parent 42d4222fb3
commit 6a46bf4f4b
3 changed files with 60 additions and 0 deletions

View File

@@ -45,6 +45,13 @@
@* PDF/A-Konformitätsstufe anzeigen *@
<div class="alert @(Model.Result.PdfAWarning ? "alert-warning" : "alert-info") mt-2">
<strong>PDF/A-Konformität:</strong> @Model.Result.PdfALevel
@if (!string.IsNullOrEmpty(Model.Result.ZugferdGuidelineId))
{
<br />
<strong>Guideline-ID:</strong>
<code>@Model.Result.ZugferdGuidelineId</code>
}
@if (Model.Result.PdfAWarning)
{
<span> ⚠️ ZUGFeRD-Rechnungen müssen PDF/A-3b sein.</span>