@@ -41,13 +41,15 @@ source product.
41414242*/
4343using System ;
44+ using iText . IO . Font . Constants ;
4445using iText . IO . Image ;
4546using iText . Kernel . Colors ;
4647using iText . Kernel . Pdf ;
4748using iText . Kernel . Pdf . Xobject ;
4849using iText . Kernel . Utils ;
4950using iText . Layout . Borders ;
5051using iText . Layout . Element ;
52+ using iText . Layout . Font ;
5153using iText . Layout . Properties ;
5254using iText . Test ;
5355using iText . Test . Attributes ;
@@ -885,6 +887,26 @@ public virtual void BorderRadiusTest06() {
885887 , "diff" ) ) ;
886888 }
887889
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+
888910 private Div CreateDiv ( Div innerOverflowDiv , String text , DeviceRgb backgroundColor , bool keepTogether , bool
889911 fillAlways , bool fillOnSplit ) {
890912 Div div = new Div ( ) . SetBorder ( new DoubleBorder ( 10 ) ) . SetBackgroundColor ( new DeviceRgb ( 216 , 243 , 255 ) ) . SetFillAvailableAreaOnSplit
0 commit comments