@@ -543,6 +543,40 @@ public void imageTest20() throws IOException, InterruptedException {
543
543
Assert .assertNull (new CompareTool ().compareByContent (outFileName , cmpFileName , destinationFolder , "diff" ));
544
544
}
545
545
546
+ @ Ignore ("DEVSIX-1658" )
547
+ @ Test
548
+ public void imageTest21 () throws IOException , InterruptedException {
549
+ String outFileName = destinationFolder + "imageTest21.pdf" ;
550
+ String cmpFileName = sourceFolder + "cmp_imageTest21.pdf" ;
551
+
552
+ PdfWriter writer = new PdfWriter (outFileName );
553
+ PdfDocument pdfDoc = new PdfDocument (writer );
554
+ Document doc = new Document (pdfDoc );
555
+
556
+ Image image = new Image (ImageDataFactory .create (sourceFolder + "Desert.jpg" ));
557
+ image .setAutoScaleHeight (true );
558
+ float [] colWidths = {1f ,1f };
559
+
560
+ Table container = new Table (UnitValue .createPercentArray (colWidths ));
561
+ container .addCell ("Text" );
562
+ container .addCell ("autoscaling image, height only" );
563
+
564
+ int textIterations =50 ;
565
+ Paragraph p = new Paragraph ();
566
+ for (int i = 0 ; i < textIterations ; i ++) {
567
+ p .add ("Text will wrap" );
568
+ }
569
+ container .addCell (p );
570
+
571
+ container .addCell (image );
572
+
573
+ doc .add (container );
574
+
575
+ doc .close ();
576
+
577
+ Assert .assertNull (new CompareTool ().compareByContent (outFileName , cmpFileName , destinationFolder , "diff" ));
578
+ }
579
+
546
580
/**
547
581
* Image can be reused in layout, so flushing it on the very first draw is a bad thing.
548
582
*/
0 commit comments