@@ -52,6 +52,7 @@ This file is part of the iText (R) project.
52
52
import com .itextpdf .kernel .font .PdfFont ;
53
53
import com .itextpdf .kernel .font .PdfFontFactory ;
54
54
import com .itextpdf .kernel .geom .PageSize ;
55
+ import com .itextpdf .kernel .geom .Rectangle ;
55
56
import com .itextpdf .kernel .pdf .CompressionConstants ;
56
57
import com .itextpdf .kernel .pdf .PdfArray ;
57
58
import com .itextpdf .kernel .pdf .PdfDictionary ;
@@ -60,6 +61,7 @@ This file is part of the iText (R) project.
60
61
import com .itextpdf .kernel .pdf .PdfWriter ;
61
62
import com .itextpdf .kernel .pdf .WriterProperties ;
62
63
import com .itextpdf .kernel .pdf .action .PdfAction ;
64
+ import com .itextpdf .kernel .pdf .annot .PdfLinkAnnotation ;
63
65
import com .itextpdf .kernel .pdf .canvas .draw .SolidLine ;
64
66
import com .itextpdf .kernel .utils .CompareTool ;
65
67
import com .itextpdf .layout .border .SolidBorder ;
@@ -69,12 +71,14 @@ This file is part of the iText (R) project.
69
71
import com .itextpdf .layout .property .TextAlignment ;
70
72
import com .itextpdf .layout .property .UnitValue ;
71
73
import com .itextpdf .layout .property .VerticalAlignment ;
74
+ import com .itextpdf .layout .property .Property ;
72
75
import com .itextpdf .test .ExtendedITextTest ;
73
76
import com .itextpdf .test .annotations .LogMessage ;
74
77
import com .itextpdf .test .annotations .LogMessages ;
75
78
import com .itextpdf .test .annotations .type .IntegrationTest ;
76
79
import org .junit .Assert ;
77
80
import org .junit .BeforeClass ;
81
+ import org .junit .Ignore ;
78
82
import org .junit .Test ;
79
83
import org .junit .experimental .categories .Category ;
80
84
import org .xml .sax .SAXException ;
@@ -401,6 +405,26 @@ public void tableTest07() throws IOException, InterruptedException, ParserConfig
401
405
compareResult ("tableTest07.pdf" , "cmp_tableTest07.pdf" );
402
406
}
403
407
408
+ @ Ignore
409
+ @ Test
410
+ public void linkInsideTable () throws IOException , InterruptedException , ParserConfigurationException , SAXException {
411
+ PdfDocument pdf = new PdfDocument (new PdfWriter (destinationFolder + "linkInsideTable.pdf" ));
412
+ pdf .setTagged ();
413
+ Document doc = new Document (pdf );
414
+
415
+ Table table = new Table (new float [] {1 ,2 ,3 }).setFixedLayout ().setWidth (400 );
416
+
417
+ table .addCell ("1x" );
418
+ table .addCell ("2x" );
419
+ table .addCell ("3x" );
420
+ table .setProperty (Property .LINK_ANNOTATION , new PdfLinkAnnotation (new Rectangle (0 , 0 )).setAction (PdfAction .createURI ("http://itextpdf.com/" )));
421
+ doc .add (table );
422
+
423
+ doc .close ();
424
+ compareResult ("linkInsideTable.pdf" , "cmp_linkInsideTable.pdf" );
425
+ }
426
+
427
+
404
428
@ Test
405
429
public void tableTest08 () throws IOException , InterruptedException , ParserConfigurationException , SAXException {
406
430
PdfDocument pdfDocument = new PdfDocument (new PdfWriter (destinationFolder + "tableTest08.pdf" ));
0 commit comments