@@ -61,7 +61,6 @@ This file is part of the iText (R) project.
61
61
import com .itextpdf .kernel .pdf .canvas .PdfCanvas ;
62
62
import com .itextpdf .kernel .pdf .filespec .PdfFileSpec ;
63
63
import com .itextpdf .kernel .pdf .tagging .StandardRoles ;
64
- import com .itextpdf .kernel .pdf .tagutils .TagTreePointer ;
65
64
import com .itextpdf .kernel .pdf .xobject .PdfFormXObject ;
66
65
import com .itextpdf .kernel .utils .CompareTool ;
67
66
import com .itextpdf .kernel .xmp .XMPException ;
@@ -217,9 +216,9 @@ public void pdfUA2RubberStampNoContentsAnnotationsTest() throws IOException, XMP
217
216
}
218
217
219
218
@ Test
220
- //TODO DEVSIX-8807 Kernel: addAnnotation method doesn't annotate content elements with Annot tag when PDF version is 2.0
221
- public void pdfUA2ScreenAnnotationsTest () throws IOException , XMPException {
219
+ public void pdfUA2ScreenAnnotationsTest () throws IOException , XMPException , InterruptedException {
222
220
String outFile = DESTINATION_FOLDER + "pdfuaScreenAnnotationTest.pdf" ;
221
+ String cmpFile = SOURCE_FOLDER + "cmp_pdfuaScreenAnnotationTest.pdf" ;
223
222
224
223
try (PdfDocument pdfDocument = new PdfDocument (
225
224
new PdfWriter (outFile , new WriterProperties ().setPdfVersion (PdfVersion .PDF_2_0 )))) {
@@ -230,7 +229,7 @@ public void pdfUA2ScreenAnnotationsTest() throws IOException, XMPException {
230
229
pdfPage .addAnnotation (screen );
231
230
pdfPage .flush ();
232
231
}
233
- new VeraPdfValidator (). validateFailure ( outFile ); // Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf\a validation on Android)
232
+ compareAndValidate ( outFile , cmpFile );
234
233
}
235
234
236
235
@ Test
@@ -319,9 +318,9 @@ public void pdfUA2RedactionNoContentsAnnotationsTest() throws IOException, XMPEx
319
318
}
320
319
321
320
@ Test
322
- //TODO DEVSIX-8807 Kernel: addAnnotation method doesn't annotate content elements with Annot tag when PDF version is 2.0
323
321
public void pdfUA23DAnnotationsTest () throws IOException , XMPException , InterruptedException {
324
322
String outFile = DESTINATION_FOLDER + "pdfua3DAnnotationTest.pdf" ;
323
+ String cmpFile = SOURCE_FOLDER + "cmp_pdfua3DAnnotationTest.pdf" ;
325
324
326
325
try (PdfDocument pdfDocument = new PdfDocument (
327
326
new PdfWriter (outFile , new WriterProperties ().setPdfVersion (PdfVersion .PDF_2_0 )))) {
@@ -332,7 +331,7 @@ public void pdfUA23DAnnotationsTest() throws IOException, XMPException, Interrup
332
331
333
332
pdfPage .flush ();
334
333
}
335
- new VeraPdfValidator (). validateFailure ( outFile ); // Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf\a validation on Android)
334
+ compareAndValidate ( outFile , cmpFile );
336
335
}
337
336
338
337
@ Test
@@ -464,9 +463,9 @@ public void pdfUA2AltContentDiffAnnotationTest()
464
463
}
465
464
466
465
@ Test
467
- //TODO DEVSIX-8807 Kernel: addAnnotation method doesn't annotate content elements with Annot tag when PDF version is 2.0
468
466
public void pdfUA2TabAnnotationsTest () throws IOException , XMPException , InterruptedException {
469
467
String outFile = DESTINATION_FOLDER + "pdfuaMultipleAnnotsTabAnnotationTest.pdf" ;
468
+ String cmpFile = SOURCE_FOLDER + "cmp_pdfuaMultipleAnnotsTabAnnotationTest.pdf" ;
470
469
471
470
try (PdfDocument pdfDocument = new PdfDocument (
472
471
new PdfWriter (outFile , new WriterProperties ().setPdfVersion (PdfVersion .PDF_2_0 )))) {
@@ -484,7 +483,7 @@ public void pdfUA2TabAnnotationsTest() throws IOException, XMPException, Interru
484
483
Assertions .assertEquals (PdfName .S , pageT );
485
484
}
486
485
}
487
- new VeraPdfValidator (). validateFailure ( outFile ); // Android-Conversion-Skip-Line (TODO DEVSIX-7377 introduce pdf\a validation on Android)
486
+ compareAndValidate ( outFile , cmpFile );
488
487
}
489
488
490
489
@ Test
0 commit comments