Package com.itextpdf.test.pdfa
Class VeraPdfValidator
java.lang.Object
com.itextpdf.test.pdfa.VeraPdfValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.verapdf.pdfa.flavours.PDFAFlavour
void
setLogToConsole
(boolean logToConsole) Set whether to log VeraPDF validation results to console.Validates pdf document by VeraPdf validator.void
validateFailure
(String filePath) Validates PDF file with VeraPdf expecting failure.void
validateWarning
(String filePath, String expectedWarning) Validates PDF file with VeraPdf expecting a warning.
-
Constructor Details
-
VeraPdfValidator
public VeraPdfValidator()
-
-
Method Details
-
getSpecification
protected org.verapdf.pdfa.flavours.PDFAFlavour getSpecification()- Returns:
-
the
PDFAFlavour
to use for validation
-
validateFailure
Validates PDF file with VeraPdf expecting failure.- Parameters:
-
filePath
- file to validate
-
setLogToConsole
public void setLogToConsole(boolean logToConsole) Set whether to log VeraPDF validation results to console.- Parameters:
-
logToConsole
- true if VeraPDF validation results should be logged to console, false otherwise
-
validateWarning
Validates PDF file with VeraPdf expecting a warning.- Parameters:
-
filePath
- file to validate -
expectedWarning
- expected VeraPdf warning
-
validate
Validates pdf document by VeraPdf validator.Verapdf has some issues with parallel validation.
- Parameters:
-
filePath
- file to validate - Returns:
- error message if validation fails, null is validation succeeds
-