@@ -41,13 +41,15 @@ source product.
41
41
42
42
*/
43
43
using System ;
44
+ using iText . IO . Font . Constants ;
44
45
using iText . IO . Image ;
45
46
using iText . Kernel . Colors ;
46
47
using iText . Kernel . Pdf ;
47
48
using iText . Kernel . Pdf . Xobject ;
48
49
using iText . Kernel . Utils ;
49
50
using iText . Layout . Borders ;
50
51
using iText . Layout . Element ;
52
+ using iText . Layout . Font ;
51
53
using iText . Layout . Properties ;
52
54
using iText . Test ;
53
55
using iText . Test . Attributes ;
@@ -885,6 +887,26 @@ public virtual void BorderRadiusTest06() {
885
887
, "diff" ) ) ;
886
888
}
887
889
890
+ /// <exception cref="System.IO.IOException"/>
891
+ /// <exception cref="System.Exception"/>
892
+ [ NUnit . Framework . Test ]
893
+ [ NUnit . Framework . Ignore ( "DEVSIX-1897" ) ]
894
+ public virtual void ParagraphVerticalAlignmentTest01 ( ) {
895
+ String outFileName = destinationFolder + "paragraphVerticalAlignmentTest01.pdf" ;
896
+ String cmpFileName = sourceFolder + "paragraphVerticalAlignmentTest01.pdf" ;
897
+ PdfDocument pdfDocument = new PdfDocument ( new PdfWriter ( outFileName ) ) ;
898
+ Document doc = new Document ( pdfDocument ) ;
899
+ FontProvider fontProvider = new FontProvider ( ) ;
900
+ fontProvider . AddStandardPdfFonts ( ) ;
901
+ doc . SetFontProvider ( fontProvider ) ;
902
+ String loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." ;
903
+ doc . Add ( new Paragraph ( loremIpsum ) . SetHeight ( 100 ) . SetVerticalAlignment ( VerticalAlignment . MIDDLE ) . SetBorder (
904
+ new SolidBorder ( 3 ) ) . SetFont ( StandardFonts . TIMES_ROMAN ) ) ;
905
+ doc . Close ( ) ;
906
+ NUnit . Framework . Assert . IsNull ( new CompareTool ( ) . CompareByContent ( outFileName , cmpFileName , destinationFolder
907
+ , "diff" ) ) ;
908
+ }
909
+
888
910
private Div CreateDiv ( Div innerOverflowDiv , String text , DeviceRgb backgroundColor , bool keepTogether , bool
889
911
fillAlways , bool fillOnSplit ) {
890
912
Div div = new Div ( ) . SetBorder ( new DoubleBorder ( 10 ) ) . SetBackgroundColor ( new DeviceRgb ( 216 , 243 , 255 ) ) . SetFillAvailableAreaOnSplit
0 commit comments