@@ -43,6 +43,7 @@ This file is part of the iText (R) project.
43
43
package com .itextpdf .layout ;
44
44
45
45
import com .itextpdf .io .LogMessageConstant ;
46
+ import com .itextpdf .io .font .constants .StandardFonts ;
46
47
import com .itextpdf .io .image .ImageDataFactory ;
47
48
import com .itextpdf .kernel .colors .ColorConstants ;
48
49
import com .itextpdf .kernel .colors .DeviceRgb ;
@@ -61,6 +62,7 @@ This file is part of the iText (R) project.
61
62
import com .itextpdf .layout .element .List ;
62
63
import com .itextpdf .layout .element .Paragraph ;
63
64
import com .itextpdf .layout .element .Text ;
65
+ import com .itextpdf .layout .font .FontProvider ;
64
66
import com .itextpdf .layout .property .BorderRadius ;
65
67
import com .itextpdf .layout .property .OverflowPropertyValue ;
66
68
import com .itextpdf .layout .property .Property ;
@@ -1126,6 +1128,26 @@ public void borderRadiusTest06() throws IOException, InterruptedException {
1126
1128
Assert .assertNull (new CompareTool ().compareByContent (outFileName , cmpFileName , destinationFolder , "diff" ));
1127
1129
}
1128
1130
1131
+ @ Test
1132
+ @ Ignore ("DEVSIX-1897" )
1133
+ public void paragraphVerticalAlignmentTest01 () throws IOException , InterruptedException {
1134
+ String outFileName = destinationFolder + "paragraphVerticalAlignmentTest01.pdf" ;
1135
+ String cmpFileName = sourceFolder + "paragraphVerticalAlignmentTest01.pdf" ;
1136
+ PdfDocument pdfDocument = new PdfDocument (new PdfWriter (outFileName ));
1137
+
1138
+ Document doc = new Document (pdfDocument );
1139
+ FontProvider fontProvider = new FontProvider ();
1140
+ fontProvider .addStandardPdfFonts ();
1141
+ doc .setFontProvider (fontProvider );
1142
+
1143
+ String loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." ;
1144
+ doc .add (new Paragraph (loremIpsum ).setHeight (100 ).setVerticalAlignment (VerticalAlignment .MIDDLE ).setBorder (new SolidBorder (3 )).setFont (StandardFonts .TIMES_ROMAN ));
1145
+
1146
+ doc .close ();
1147
+
1148
+ Assert .assertNull (new CompareTool ().compareByContent (outFileName , cmpFileName , destinationFolder , "diff" ));
1149
+ }
1150
+
1129
1151
1130
1152
private Div createDiv (Div innerOverflowDiv , String text , DeviceRgb backgroundColor , boolean keepTogether , boolean fillAlways , boolean fillOnSplit ) {
1131
1153
Div div = new Div ().setBorder (new DoubleBorder (10 )).setBackgroundColor (new DeviceRgb (216 , 243 , 255 )).setFillAvailableAreaOnSplit (fillOnSplit ).setFillAvailableArea (fillAlways );
0 commit comments