Class PdfAPreservationValidator
- Namespace
- SimpleSign.PAdES.Signing
- Assembly
- SimpleSign.PAdES.dll
Validates that a signing operation will not break PDF/A conformance. This is a pre-signing check — it examines the source PDF and the requested signature options to determine if the result will remain PDF/A-compliant.
public static class PdfAPreservationValidator
- Inheritance
-
PdfAPreservationValidator
- Inherited Members
Methods
Validate(PdfALevel, SignatureFieldOptions)
Validates whether the signature options are compatible with the detected PDF/A level. Returns a list of issues found. An empty list means the signature is safe.
public static IReadOnlyList<PdfACompatibilityIssue> Validate(PdfALevel pdfALevel, SignatureFieldOptions options)
Parameters
pdfALevelPdfALevelThe detected PDF/A level of the input document.
optionsSignatureFieldOptionsThe signature field options to validate.
Returns
- IReadOnlyList<PdfACompatibilityIssue>
A list of compatibility issues. Empty if signing is safe.
ValidateAsync(Stream, SignatureFieldOptions, CancellationToken)
Validates whether the signature options are compatible with the detected PDF/A level.
public static Task<IReadOnlyList<PdfACompatibilityIssue>> ValidateAsync(Stream pdfData, SignatureFieldOptions options, CancellationToken cancellationToken = default)
Parameters
pdfDataStreamRaw PDF bytes.
optionsSignatureFieldOptionsThe signature field options to validate.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<IReadOnlyList<PdfACompatibilityIssue>>
A list of compatibility issues. Empty if signing is safe.