Skip to content

Commit

Permalink
Merge pull request #606 from veraPDF/metadata_fixer
Browse files Browse the repository at this point in the history
Update metadata fixer. Fix addPDFAIdentificationSchema
  • Loading branch information
MaximPlusov authored and Git User committed Nov 2, 2023
1 parent 59fc17d commit 1afc3a2
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ public void addPDFUAIdentificationSchema(MetadataFixerResultImpl.Builder resultB
}

public void addPDFAIdentificationSchema(MetadataFixerResultImpl.Builder resultBuilder, PDFAFlavour flavour) {
if (isValidPDFAIdentification() && !isWrongPDFAIdentification(flavour)) {
return;
}
int part = flavour.getPart().getPartNumber();
String conformance = flavour != PDFAFlavour.PDFA_4 ? flavour.getLevel().getCode().toUpperCase() : null;
try {
Expand All @@ -217,7 +214,7 @@ public void addPDFAIdentificationSchema(MetadataFixerResultImpl.Builder resultBu
this.setNeedToBeUpdated(true);
}

if (isWrongPDFAIdentification(flavour)) {
if (!isValidPDFAIdentification() || isWrongPDFAIdentification(flavour)) {
resultBuilder.addFix(String.format(this.metadata.getPDFAIdentificationConformance() == null ?
ADD_PROPERTY_MESSAGE : (conformance == null ? REMOVE_PROPERTY_MESSAGE : SET_PROPERTY_MESSAGE),
VeraPDFMeta.CONFORMANCE, conformance));
Expand Down

0 comments on commit 1afc3a2

Please sign in to comment.