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:
@@ -17,6 +17,11 @@ public class PdfExtractionResult
|
||||
// Soll eine Warnung angezeigt werden?
|
||||
// true wenn kein PDF/A → ZUGFeRD-Rechnungen müssen PDF/A-3b sein
|
||||
public bool PdfAWarning { get; set; }
|
||||
|
||||
// ZUGFeRD Guideline-ID aus XMP-Metadaten
|
||||
// Beispiel: "urn:ferd:invoice:rc:comfort"
|
||||
// Leer wenn keine ZUGFeRD-Metadaten gefunden
|
||||
public string ZugferdGuidelineId { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class ExtractedAttachment
|
||||
|
||||
Reference in New Issue
Block a user