Class PdfConformanceValidator
- Namespace
- EInvoice.FacturX.Validation
- Assembly
- EInvoice.FacturX.dll
Validates an input PDF for Factur-X conformance requirements before merging.
public sealed class PdfConformanceValidator
- Inheritance
-
PdfConformanceValidator
- Inherited Members
Remarks
Call Validate(Stream) before passing the same stream to
HybridInvoiceMerger.Merge. This validator does not rewind the
input stream after reading it — callers must set stream.Position = 0
before passing it to the merger.
This method never throws. All error paths, including null/empty streams and corrupt PDFs, are reported as PdfValidationResult violations.
Constructors
PdfConformanceValidator()
Initialises the validator with the default built-in rule set: IncompatibleVersionRule, ConflictingAttachmentRule, and FontNotEmbeddedRule.
public PdfConformanceValidator()
PdfConformanceValidator(IEnumerable<IPdfValidationRule>)
Initialises the validator with a custom set of rules.
public PdfConformanceValidator(IEnumerable<IPdfValidationRule> rules)
Parameters
rulesIEnumerable<IPdfValidationRule>
Methods
Validate(Stream)
Validates inputPdf and returns a PdfValidationResult
describing any conformance issues found.
public PdfValidationResult Validate(Stream inputPdf)
Parameters
inputPdfStreamThe PDF stream to inspect. Must be readable. Position is not reset after reading.