PdfMetadata and PdfAMetadata were redundant intermediate classes that mirrored PdfValidationResult and PdfAValidationResult exactly. Changes: - Delete PdfMetadata.cs and PdfAMetadata.cs - IPdfProcessor.ValidateAsync now returns PdfValidationResult directly - IPdfProcessor.ValidatePdfAAsync now returns PdfAValidationResult directly - ValidatePdfQueryHandler: remove IMapper dependency, return result directly - ValidatePdfAQueryHandler: remove IMapper dependency, return result directly - MappingProfile: remove the two now-obsolete CreateMap calls - PdfValidationResult: add IsEncrypted parameter (was missing)
21 lines
785 B
C#
21 lines
785 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);
|