Skip to content

Commit

Permalink
Merge pull request #398 from veraPDF/wtpdf_flavours
Browse files Browse the repository at this point in the history
Fix flavour readable text for WTPDF
  • Loading branch information
MaximPlusov authored Apr 24, 2024
2 parents 4da26b6 + 477c02e commit cbb4c3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gui/src/main/java/org/verapdf/gui/CheckerPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.verapdf.gui.utils.*;
import org.verapdf.pdfa.Foundries;
import org.verapdf.pdfa.flavours.PDFAFlavour;
import org.verapdf.pdfa.flavours.PDFFlavours;
import org.verapdf.pdfa.validation.profiles.Profiles;
import org.verapdf.pdfa.validation.profiles.ValidationProfile;
import org.verapdf.pdfa.validation.validators.ValidatorConfig;
Expand Down Expand Up @@ -922,6 +923,10 @@ private boolean isFixMetadata() {
}

protected static String getFlavourReadableText(PDFAFlavour flavour) {
if (PDFFlavours.isWTPDFFlavour(flavour)) {
return flavour.getPart().getFamily().getFamily() + " " + flavour.getPart().getPartNumber() +
"." + flavour.getPart().getSubpartNumber() + " " + flavour.getLevel().getCode();
}
return String.format(flavour.getPart().getFamily().getFamily() + "-%d%S", flavour.getPart().getPartNumber(), //$NON-NLS-1$
flavour.getLevel().getCode());
}
Expand Down

0 comments on commit cbb4c3f

Please sign in to comment.