Verify PDF Format Compliance
ImageGear .NET provides the ImGearPDFPreflight.VerifyCompliance method to validate if a PDF document was created in compliance with PDF/A or PDF/X standards.
This method does not change the original PDF document; it just analyzes the content of a PDF document and reports detected incompliance. The verifier report is returned as a tree, grouped by the common document part and the pages. Each node in the report tree represented by ImGearPDFPreflightReport class corresponds to an incompliance with PDF/A or PDF/X standards.
The status code of each reported incompliance node can have one of the following ImGearPDFPreflightStatusCode values:
- Fixable – reports incompliance that can be fixed by the automated PDF Converter.
- Unfixable – reports incompliance that cannot be fixed by the automated PDF Converter. Such incompliance should be fixed using the ImageGear PDF editing API.
PDF annotations can only be verified while they reside in a PDF document. Loading PDF annotation to ART will detach them from the PDF document and make them unavailable for PDF/A or PDF/X compliance validation.
The following example illustrates how a PDF document can be verified for compliance with one of the PDF standards.
PDF support needs to be initialized first for this snippet to work. To get familiar with initializing IGNET, initializing PDF support, loading a PDF, saving a PDF, and terminating PDF support, try any one of the
tutorials.