Files
DocumentService/DocumentService.Application/Common/DTOs/PdfValidationResult.cs
TekH 0c27e4fd91 Add WorkflowsClient for PDF validation and QR extraction
Introduced a new `WorkflowsClient` to orchestrate multi-step
operations, combining `IPdfValidationClient` and
`ISwissQrCodeClient`. Added methods to validate PDFs and extract
Swiss QR Codes in a single call, with overloads for byte arrays,
streams, and file paths. Registered `WorkflowsClient` as a scoped
service in `ServiceCollectionExtensions`.

Updated `PdfValidationResult` with an `IsValid` property to
simplify PDF validity checks. Added `IWorkflowsClient` interface
to define the contract for the new client, with detailed XML
documentation for its methods.
2026-08-31 03:21:41 +02:00

24 lines
867 B
C#

namespace DocumentService.Application.Common.DTOs;
/// <summary>
/// Response mit PDF-Metadaten
/// </summary>
/// <param name="PageCount">Anzahl der Seiten</param>
/// <param name="FileSizeBytes">Dateigröße in Bytes</param>
/// <param name="FileSizeMB">Dateigröße in MB (gerundet auf 2 Dezimalstellen)</param>
/// <param name="PdfVersion">PDF-Version (z.B. "1.4")</param>
/// <param name="HasAttachments">Hat das PDF Anhänge?</param>
/// <param name="AttachmentCount">Anzahl der Anhänge</param>
/// <param name="IsEncrypted">Ist das PDF passwortgeschützt/verschlüsselt?</param>
public record PdfValidationResult(
int PageCount,
long FileSizeBytes,
double FileSizeMB,
string PdfVersion,
bool HasAttachments,
int AttachmentCount,
bool IsEncrypted)
{
public bool IsValid => !IsEncrypted && PageCount > 0 && FileSizeBytes > 0;
}