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 {
16
16
public static final String AllColourChannelsInTheJpeg2000DataShallHaveTheSameBitDepth = "all.colour.channels.in.the.jpeg2000.data.shall.have.the.same.bit-depth" ;
17
17
public static final String AllHalftonesShallHaveHalftonetype1Or5 = "all.halftones.shall.have.halftonetype.1.or.5" ;
18
18
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" ;
19
20
public static final String AnAnnotationDictionaryShallNotContainTheCaKeyWithAValueOtherThan1 = "an.annotation.dictionary.shall.not.contain.the.ca.key.with.a.value.other.than.1" ;
20
21
public static final String AnExtgstateDictionaryShallNotContainTheHTPKey = "an.extgstate.dictionary.shall.not.contain.the.HTP.key" ;
21
22
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) {
360
360
throw new PdfAConformanceException (PdfAConformanceException .WidgetAnnotationDictionaryOrFieldDictionaryShallNotIncludeAOrAAEntry );
361
361
}
362
362
363
+ if (annotDic .containsKey (PdfName .AA )) {
364
+ throw new PdfAConformanceException (PdfAConformanceException .AnAnnotationDictionaryShallNotContainAAKey );
365
+ }
366
+
363
367
if (checkStructure (conformanceLevel )) {
364
368
if (contentAnnotations .contains (subtype ) && !annotDic .containsKey (PdfName .Contents )) {
365
369
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) {
281
281
throw new PdfAConformanceException (PdfAConformanceException .WidgetAnnotationDictionaryOrFieldDictionaryShallNotIncludeAOrAAEntry );
282
282
}
283
283
284
+ if (annotDic .containsKey (PdfName .AA )) {
285
+ throw new PdfAConformanceException (PdfAConformanceException .AnAnnotationDictionaryShallNotContainAAKey );
286
+ }
287
+
284
288
if (checkStructure (conformanceLevel )) {
285
289
if (contentAnnotations .contains (subtype ) && !annotDic .containsKey (PdfName .Contents )) {
286
290
throw new PdfAConformanceException (PdfAConformanceException .AnnotationOfType1ShouldHaveContentsKey ).setMessageParams (subtype );
Original file line number Diff line number Diff line change 14
14
import com .itextpdf .kernel .pdf .PdfStream ;
15
15
import com .itextpdf .kernel .pdf .PdfString ;
16
16
import com .itextpdf .kernel .pdf .colorspace .PdfColorSpace ;
17
+ import com .itextpdf .pdfa .PdfAConformanceException ;
17
18
18
19
import java .util .ArrayList ;
19
20
import java .util .HashMap ;
@@ -231,10 +232,6 @@ private void checkAnnotations(PdfDictionary page) {
231
232
if (action != null ) {
232
233
checkAction (action );
233
234
}
234
- action = annotDic .getAsDictionary (PdfName .AA );
235
- if (action != null ) {
236
- checkAction (action );
237
- }
238
235
}
239
236
}
240
237
}
Original file line number Diff line number Diff line change 30
30
public class PdfAFontTest {
31
31
32
32
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 /" ;
34
34
35
35
@ BeforeClass
36
36
static public void beforeClass () {
You can’t perform that action at this time.
0 commit comments