@@ -58,6 +58,7 @@ This file is part of the iText (R) project.
58
58
import com .itextpdf .kernel .pdf .PdfDictionary ;
59
59
import com .itextpdf .kernel .pdf .PdfDocument ;
60
60
import com .itextpdf .kernel .pdf .PdfName ;
61
+ import com .itextpdf .kernel .pdf .PdfVersion ;
61
62
import com .itextpdf .kernel .pdf .PdfWriter ;
62
63
import com .itextpdf .kernel .pdf .WriterProperties ;
63
64
import com .itextpdf .kernel .pdf .action .PdfAction ;
@@ -566,7 +567,7 @@ public void listTest03() throws IOException, InterruptedException, ParserConfigu
566
567
567
568
List list = new List (ListNumberingType .DECIMAL );
568
569
// explicitly overriding ListNumbering attribute
569
- list .getAccessibilityProperties ().addAttributes (attributesSquare );
570
+ list .getAccessibilityProperties ().addAttributes (attributesSquare ); // TODO not working
570
571
list .add ("item 1" );
571
572
list .add ("item 2" );
572
573
list .add ("item 3" );
@@ -916,7 +917,6 @@ public void imageAndTextNoRole01() throws IOException, ParserConfigurationExcept
916
917
}
917
918
918
919
@ Test
919
- @ Ignore ("DEVSIX-1463" )
920
920
public void tableWithCaption01 () throws IOException , ParserConfigurationException , SAXException , InterruptedException {
921
921
PdfWriter writer = new PdfWriter (destinationFolder + "tableWithCaption01.pdf" );
922
922
PdfDocument pdf = new PdfDocument (writer );
@@ -979,6 +979,46 @@ public void floatListItemTest() throws IOException, ParserConfigurationException
979
979
compareResult ("floatListItemTest.pdf" , "cmp_floatListItemTest.pdf" );
980
980
}
981
981
982
+ @ Test
983
+ public void createTaggedVersionOneDotFourTest01 () throws IOException , InterruptedException , ParserConfigurationException , SAXException {
984
+ PdfDocument pdfDocument = new PdfDocument (new PdfWriter (destinationFolder + "createTaggedVersionOneDotFourTest01.pdf" , new WriterProperties ().setPdfVersion (PdfVersion .PDF_1_4 )));
985
+ pdfDocument .setTagged ();
986
+
987
+ Document document = new Document (pdfDocument );
988
+
989
+ Table table = new Table (UnitValue .createPercentArray (3 )).useAllAvailableWidth ()
990
+ .setWidth (UnitValue .createPercentValue (100 ))
991
+ .setFixedLayout ();
992
+
993
+
994
+ Cell cell = new Cell (1 , 3 ).add (new Paragraph ("full-width header" ));
995
+ cell .setRole (PdfName .TH );
996
+ table .addHeaderCell (cell );
997
+ for (int i = 0 ; i < 3 ; ++i ) {
998
+ cell = new Cell ().add (new Paragraph ("header " + i ));
999
+ cell .setRole (PdfName .TH );
1000
+ table .addHeaderCell (cell );
1001
+ }
1002
+
1003
+ for (int i = 0 ; i < 3 ; ++i ) {
1004
+ table .addFooterCell ("footer " + i );
1005
+ }
1006
+
1007
+ cell = new Cell (1 , 3 ).add (new Paragraph ("full-width paragraph" ));
1008
+ table .addCell (cell );
1009
+ for (int i = 0 ; i < 20 ; ++i ) {
1010
+ table .addCell (createParagraph2 ());
1011
+ }
1012
+
1013
+ table .addCell (new Paragraph ("little text" ));
1014
+
1015
+ document .add (table );
1016
+
1017
+ document .close ();
1018
+
1019
+ compareResult ("createTaggedVersionOneDotFourTest01.pdf" , "cmp_createTaggedVersionOneDotFourTest01.pdf" );
1020
+ }
1021
+
982
1022
private Paragraph createParagraph1 () throws IOException {
983
1023
PdfFont font = PdfFontFactory .createFont (FontConstants .HELVETICA_BOLD );
984
1024
Paragraph p = new Paragraph ().add ("text chunk. " ).add ("explicitly added separate text chunk" );
0 commit comments