@@ -663,9 +663,8 @@ public virtual void ClearanceApplyingPageSplit07() {
663663 /// <exception cref="System.IO.IOException"/>
664664 /// <exception cref="System.Exception"/>
665665 [ NUnit . Framework . Test ]
666+ [ NUnit . Framework . Ignore ( "DEVSIX-1437" ) ]
666667 public virtual void ClearanceApplyingPageSplit08 ( ) {
667- // TODO process NOTHING case - only floats with nothing overflowed, clear is met
668- // TODO avoid possible infinite loop in this case.
669668 String cmpFileName = sourceFolder + "cmp_clearanceApplyingPageSplit08.pdf" ;
670669 String outFile = destinationFolder + "clearanceApplyingPageSplit08.pdf" ;
671670 Document document = new Document ( new PdfDocument ( new PdfWriter ( outFile ) ) ) ;
@@ -716,6 +715,7 @@ public virtual void ClearanceApplyingPageSplit09() {
716715 /// <exception cref="System.IO.IOException"/>
717716 /// <exception cref="System.Exception"/>
718717 [ NUnit . Framework . Test ]
718+ [ LogMessage ( iText . IO . LogMessageConstant . ELEMENT_DOES_NOT_FIT_AREA , Count = 2 ) ]
719719 public virtual void FloatsOnPageSplit01 ( ) {
720720 String cmpFileName = sourceFolder + "cmp_floatsOnPageSplit01.pdf" ;
721721 String outFile = destinationFolder + "floatsOnPageSplit01.pdf" ;
@@ -778,6 +778,7 @@ public virtual void FloatsOnPageSplit03() {
778778 /// <exception cref="System.IO.IOException"/>
779779 /// <exception cref="System.Exception"/>
780780 [ NUnit . Framework . Test ]
781+ [ LogMessage ( iText . IO . LogMessageConstant . ELEMENT_DOES_NOT_FIT_AREA ) ]
781782 public virtual void FloatsOnPageSplit04 ( ) {
782783 String cmpFileName = sourceFolder + "cmp_floatsOnPageSplit04.pdf" ;
783784 String outFile = destinationFolder + "floatsOnPageSplit04.pdf" ;
@@ -823,20 +824,23 @@ public virtual void FloatsOnPageSplit05() {
823824 /// <exception cref="System.IO.IOException"/>
824825 /// <exception cref="System.Exception"/>
825826 [ NUnit . Framework . Test ]
827+ [ NUnit . Framework . Ignore ( "DEVSIX-1437" ) ]
826828 public virtual void FloatsOnPageSplit06 ( ) {
827- // TODO what if overflow renderer is not null already?? at the end of blockRenderer
828829 String cmpFileName = sourceFolder + "cmp_floatsOnPageSplit06.pdf" ;
829830 String outFile = destinationFolder + "floatsOnPageSplit06.pdf" ;
830831 Document document = new Document ( new PdfDocument ( new PdfWriter ( outFile ) ) ) ;
831832 document . Add ( new Paragraph ( text + text ) ) ;
832833 Div div = new Div ( ) . SetBorder ( new SolidBorder ( Color . RED , 2 ) ) ;
833834 div . SetHeight ( 600 ) ;
835+ // TODO Setting fixed height for the div, that will be split between pages.
834836 iText . Layout . Element . Image img = new iText . Layout . Element . Image ( ImageDataFactory . Create ( sourceFolder + "itis.jpg"
835837 ) ) . SetHeight ( 400 ) ;
836838 img . SetProperty ( Property . FLOAT , FloatPropertyValue . RIGHT ) ;
837839 div . Add ( img ) ;
840+ // TODO Adding float that will not fit on the first page.
838841 div . Add ( new Paragraph ( "some small text" ) ) ;
839842 document . Add ( div ) ;
843+ // TODO div height shall be correct on the second page.
840844 document . Close ( ) ;
841845 NUnit . Framework . Assert . IsNull ( new CompareTool ( ) . CompareByContent ( outFile , cmpFileName , destinationFolder ,
842846 "diff22_" ) ) ;
@@ -845,8 +849,8 @@ public virtual void FloatsOnPageSplit06() {
845849 /// <exception cref="System.IO.IOException"/>
846850 /// <exception cref="System.Exception"/>
847851 [ NUnit . Framework . Test ]
852+ [ NUnit . Framework . Ignore ( "DEVSIX-1437" ) ]
848853 public virtual void FloatsOnPageSplit07 ( ) {
849- // TODO floats with nothing overflowed, next normal kid returned NOTHING
850854 String cmpFileName = sourceFolder + "cmp_floatsOnPageSplit07.pdf" ;
851855 String outFile = destinationFolder + "floatsOnPageSplit07.pdf" ;
852856 Document document = new Document ( new PdfDocument ( new PdfWriter ( outFile ) ) ) ;
@@ -855,11 +859,13 @@ public virtual void FloatsOnPageSplit07() {
855859 containerDiv . SetBorder ( new SolidBorder ( Color . MAGENTA , 2 ) ) ;
856860 Div div = new Div ( ) . SetBorder ( new SolidBorder ( Color . RED , 2 ) ) ;
857861 iText . Layout . Element . Image img = new iText . Layout . Element . Image ( ImageDataFactory . Create ( sourceFolder + "itis.jpg"
858- ) ) . SetHeight ( 400 ) ;
862+ ) ) . SetHeight ( 200 ) ;
859863 div . Add ( img ) ;
860864 div . SetProperty ( Property . FLOAT , FloatPropertyValue . RIGHT ) ;
861865 containerDiv . Add ( div ) ;
866+ // TODO Adding float that WILL fit on the first page.
862867 containerDiv . Add ( img ) ;
868+ // TODO Adding that shall be overflowed to the next page. containerDiv occupied area shall not have zero height on first page.
863869 document . Add ( containerDiv ) ;
864870 document . Close ( ) ;
865871 NUnit . Framework . Assert . IsNull ( new CompareTool ( ) . CompareByContent ( outFile , cmpFileName , destinationFolder ,
@@ -869,6 +875,7 @@ public virtual void FloatsOnPageSplit07() {
869875 /// <exception cref="System.IO.IOException"/>
870876 /// <exception cref="System.Exception"/>
871877 [ NUnit . Framework . Test ]
878+ [ NUnit . Framework . Ignore ( "DEVSIX-1437" ) ]
872879 public virtual void FloatsOnPageSplit08 ( ) {
873880 String cmpFileName = sourceFolder + "cmp_floatsOnPageSplit08.pdf" ;
874881 String outFile = destinationFolder + "floatsOnPageSplit08.pdf" ;
@@ -880,9 +887,11 @@ public virtual void FloatsOnPageSplit08() {
880887 iText . Layout . Element . Image img = new iText . Layout . Element . Image ( ImageDataFactory . Create ( sourceFolder + "itis.jpg"
881888 ) ) . SetHeight ( 400 ) ;
882889 div . Add ( img ) ;
890+ // TODO Adding image that will not fit on first page to float.
883891 div . SetProperty ( Property . FLOAT , FloatPropertyValue . RIGHT ) ;
884892 containerDiv . Add ( div ) ;
885893 containerDiv . Add ( img ) ;
894+ // TODO Adding normal image that will not fit on the first page.
886895 document . Add ( containerDiv ) ;
887896 document . Close ( ) ;
888897 NUnit . Framework . Assert . IsNull ( new CompareTool ( ) . CompareByContent ( outFile , cmpFileName , destinationFolder ,
@@ -918,8 +927,8 @@ public virtual void FloatsOnPageSplit09() {
918927 /// <exception cref="System.IO.IOException"/>
919928 /// <exception cref="System.Exception"/>
920929 [ NUnit . Framework . Test ]
930+ [ LogMessage ( iText . IO . LogMessageConstant . ELEMENT_DOES_NOT_FIT_AREA ) ]
921931 public virtual void FloatsOnPageSplit10 ( ) {
922- // TODO what if only floats are kids and all returned NOTHING - should return NOTHING
923932 String cmpFileName = sourceFolder + "cmp_floatsOnPageSplit10.pdf" ;
924933 String outFile = destinationFolder + "floatsOnPageSplit10.pdf" ;
925934 Document document = new Document ( new PdfDocument ( new PdfWriter ( outFile ) ) ) ;
@@ -941,8 +950,8 @@ public virtual void FloatsOnPageSplit10() {
941950 /// <exception cref="System.IO.IOException"/>
942951 /// <exception cref="System.Exception"/>
943952 [ NUnit . Framework . Test ]
953+ [ NUnit . Framework . Ignore ( "DEVSIX-1437" ) ]
944954 public virtual void FloatsOnPageSplit11 ( ) {
945- // TODO if some float returned NOTHING - all other floats should not be placed
946955 String cmpFileName = sourceFolder + "cmp_floatsOnPageSplit11.pdf" ;
947956 String outFile = destinationFolder + "floatsOnPageSplit11.pdf" ;
948957 Document document = new Document ( new PdfDocument ( new PdfWriter ( outFile ) ) ) ;
@@ -955,14 +964,54 @@ public virtual void FloatsOnPageSplit11() {
955964 div . Add ( img ) ;
956965 div . SetProperty ( Property . FLOAT , FloatPropertyValue . RIGHT ) ;
957966 containerDiv . Add ( div ) ;
967+ // TODO Adding float that will not fit.
958968 Div div2 = new Div ( ) . SetBorder ( new SolidBorder ( Color . RED , 2 ) ) ;
959969 div2 . Add ( new Paragraph ( text ) ) . SetWidth ( 300 ) ;
960970 div2 . SetProperty ( Property . FLOAT , FloatPropertyValue . RIGHT ) ;
961971 containerDiv . Add ( div2 ) ;
972+ // TODO Adding float that shall be after the previous float.
962973 document . Add ( containerDiv ) ;
963974 document . Close ( ) ;
964975 NUnit . Framework . Assert . IsNull ( new CompareTool ( ) . CompareByContent ( outFile , cmpFileName , destinationFolder ,
965- "diff21_" ) ) ;
976+ "diff31_" ) ) ;
977+ }
978+
979+ /// <exception cref="System.IO.IOException"/>
980+ /// <exception cref="System.Exception"/>
981+ [ NUnit . Framework . Test ]
982+ [ NUnit . Framework . Ignore ( "DEVSIX-1437" ) ]
983+ public virtual void FloatsOnPageSplit12 ( ) {
984+ String cmpFileName = sourceFolder + "cmp_floatsOnPageSplit12.pdf" ;
985+ String outFile = destinationFolder + "floatsOnPageSplit12.pdf" ;
986+ Document document = new Document ( new PdfDocument ( new PdfWriter ( outFile ) ) ) ;
987+ Div div = new Div ( ) . SetBorder ( new SolidBorder ( Color . RED , 2 ) ) ;
988+ iText . Layout . Element . Image img = new iText . Layout . Element . Image ( ImageDataFactory . Create ( sourceFolder + "itis.jpg"
989+ ) ) . SetHeight ( 400 ) . SetWidth ( 100 ) ;
990+ img . SetProperty ( Property . FLOAT , FloatPropertyValue . RIGHT ) ;
991+ div . SetHeight ( 300 ) . Add ( img ) ;
992+ // TODO Div shall have height of 300pt.
993+ document . Add ( div ) ;
994+ document . Close ( ) ;
995+ NUnit . Framework . Assert . IsNull ( new CompareTool ( ) . CompareByContent ( outFile , cmpFileName , destinationFolder ,
996+ "diff32_" ) ) ;
997+ }
998+
999+ /// <exception cref="System.IO.IOException"/>
1000+ /// <exception cref="System.Exception"/>
1001+ [ NUnit . Framework . Test ]
1002+ [ NUnit . Framework . Ignore ( "DEVSIX-1437" ) ]
1003+ public virtual void FloatsOnPageSplit13 ( ) {
1004+ String cmpFileName = sourceFolder + "cmp_floatsOnPageSplit13.pdf" ;
1005+ String outFile = destinationFolder + "floatsOnPageSplit13.pdf" ;
1006+ Document document = new Document ( new PdfDocument ( new PdfWriter ( outFile ) ) ) ;
1007+ Div div = new Div ( ) . SetBorder ( new SolidBorder ( Color . RED , 2 ) ) ;
1008+ Paragraph p = new Paragraph ( text ) ;
1009+ p . SetProperty ( Property . FLOAT , FloatPropertyValue . RIGHT ) ;
1010+ div . SetHeight ( 100 ) . Add ( p ) ;
1011+ document . Add ( div ) ;
1012+ document . Close ( ) ;
1013+ NUnit . Framework . Assert . IsNull ( new CompareTool ( ) . CompareByContent ( outFile , cmpFileName , destinationFolder ,
1014+ "diff32_" ) ) ;
9661015 }
9671016 }
9681017}
0 commit comments