diff --git a/core/src/main/java/org/verapdf/pdfa/flavours/PDFAFlavour.java b/core/src/main/java/org/verapdf/pdfa/flavours/PDFAFlavour.java index c1170214b..d5cdf7e33 100644 --- a/core/src/main/java/org/verapdf/pdfa/flavours/PDFAFlavour.java +++ b/core/src/main/java/org/verapdf/pdfa/flavours/PDFAFlavour.java @@ -246,17 +246,23 @@ private String calculateID() { StringBuilder id = new StringBuilder(); if (SpecificationFamily.WTPDF == this.getFamily() || SpecificationFamily.WCAG == this.getFamily()) { id.append(this.getFamily().getFamily()); + if (this.getPartNumber() != null) { + id.append(" ").append(this.getPartNumber()); + if (this.getSubpartNumber() != null) { + id.append(".").append(this.getSubpartNumber()); + } + } } else { id.append(this.getSeries().getName()); - } - if (this.getPartNumber() != null) { - id.append("-").append(this.getPartNumber()); - if (this.getSubpartNumber() != null) { - id.append(".").append(this.getSubpartNumber()); + if (this.getPartNumber() != null) { + id.append("-").append(this.getPartNumber()); + if (this.getSubpartNumber() != null) { + id.append(".").append(this.getSubpartNumber()); + } + } + if (this.getYear() != null) { + id.append(":").append(this.getYear()); } - } - if (this.getYear() != null) { - id.append(":").append(this.getYear()); } return id.toString(); }