File tree Expand file tree Collapse file tree 5 files changed +11
-5
lines changed
main/java/com/itextpdf/pdfa
test/java/com/itextpdf/pdfa Expand file tree Collapse file tree 5 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public class PdfAConformanceException extends PdfException {
1616 public static final String AllColourChannelsInTheJpeg2000DataShallHaveTheSameBitDepth = "all.colour.channels.in.the.jpeg2000.data.shall.have.the.same.bit-depth" ;
1717 public static final String AllHalftonesShallHaveHalftonetype1Or5 = "all.halftones.shall.have.halftonetype.1.or.5" ;
1818 public static final String AnAnnotationDictionaryShallContainTheFKey = "an.annotation.dictionary.shall.contain.the.f.key" ;
19+ public static final String AnAnnotationDictionaryShallNotContainAAKey = "an.annotation.dictionary.shall.not.contain.aa.key" ;
1920 public static final String AnAnnotationDictionaryShallNotContainTheCaKeyWithAValueOtherThan1 = "an.annotation.dictionary.shall.not.contain.the.ca.key.with.a.value.other.than.1" ;
2021 public static final String AnExtgstateDictionaryShallNotContainTheHTPKey = "an.extgstate.dictionary.shall.not.contain.the.HTP.key" ;
2122 public static final String AnExtgstateDictionaryShallNotContainTheTR2KeyWithAValueOtherThanDefault = "an.extgstate.dictionary.shall.not.contain.the.TR2.key.with.a.value.other.than.default" ;
Original file line number Diff line number Diff line change @@ -360,6 +360,10 @@ protected void checkAnnotation(PdfDictionary annotDic) {
360360 throw new PdfAConformanceException (PdfAConformanceException .WidgetAnnotationDictionaryOrFieldDictionaryShallNotIncludeAOrAAEntry );
361361 }
362362
363+ if (annotDic .containsKey (PdfName .AA )) {
364+ throw new PdfAConformanceException (PdfAConformanceException .AnAnnotationDictionaryShallNotContainAAKey );
365+ }
366+
363367 if (checkStructure (conformanceLevel )) {
364368 if (contentAnnotations .contains (subtype ) && !annotDic .containsKey (PdfName .Contents )) {
365369 throw new PdfAConformanceException (PdfAConformanceException .AnnotationOfType1ShouldHaveContentsKey ).setMessageParams (subtype );
Original file line number Diff line number Diff line change @@ -281,6 +281,10 @@ protected void checkAnnotation(PdfDictionary annotDic) {
281281 throw new PdfAConformanceException (PdfAConformanceException .WidgetAnnotationDictionaryOrFieldDictionaryShallNotIncludeAOrAAEntry );
282282 }
283283
284+ if (annotDic .containsKey (PdfName .AA )) {
285+ throw new PdfAConformanceException (PdfAConformanceException .AnAnnotationDictionaryShallNotContainAAKey );
286+ }
287+
284288 if (checkStructure (conformanceLevel )) {
285289 if (contentAnnotations .contains (subtype ) && !annotDic .containsKey (PdfName .Contents )) {
286290 throw new PdfAConformanceException (PdfAConformanceException .AnnotationOfType1ShouldHaveContentsKey ).setMessageParams (subtype );
Original file line number Diff line number Diff line change 1414import com .itextpdf .kernel .pdf .PdfStream ;
1515import com .itextpdf .kernel .pdf .PdfString ;
1616import com .itextpdf .kernel .pdf .colorspace .PdfColorSpace ;
17+ import com .itextpdf .pdfa .PdfAConformanceException ;
1718
1819import java .util .ArrayList ;
1920import java .util .HashMap ;
@@ -231,10 +232,6 @@ private void checkAnnotations(PdfDictionary page) {
231232 if (action != null ) {
232233 checkAction (action );
233234 }
234- action = annotDic .getAsDictionary (PdfName .AA );
235- if (action != null ) {
236- checkAction (action );
237- }
238235 }
239236 }
240237 }
Original file line number Diff line number Diff line change 3030public class PdfAFontTest {
3131
3232 static final String sourceFolder = "./src/test/resources/com/itextpdf/pdfa/" ;
33- static final String outputDir = "./target/test/PdfA2 /" ;
33+ static final String outputDir = "./target/test/PdfAFontTest /" ;
3434
3535 @ BeforeClass
3636 static public void beforeClass () {
You can’t perform that action at this time.
0 commit comments