diff --git a/README.md b/README.md index 63cb398705..536c23b4cb 100644 --- a/README.md +++ b/README.md @@ -103,8 +103,9 @@ results. | **PDF/UA, PDF/A** | | | Create PDF/UA document | [C#](https://github.com/itext/i7ns-samples/blob/master/itext/itext.samples/itext/samples/sandbox/pdfua/PdfUA.cs), [PDF](https://github.com/itext/i7ns-samples/blob/master/itext/itext.samples/cmpfiles/sandbox/pdfua/cmp_pdf_ua.pdf) | | Create PDF/A-3 document | [C#](https://github.com/itext/i7ns-samples/blob/master/itext/itext.samples/itext/samples/sandbox/pdfa/PdfA3.cs) | -| Create PDF/A-4 document | [C#](https://github.com/itext/i7ns-samples/blob/develop/itext/itext.samples/itext/samples/sandbox/pdfa/PdfA4.cs) | -| Create Wtpdf document | [C#](https://github.com/itext/i7ns-samples/blob/develop/itext/itext.samples/itext/samples/sandbox/pdfua/Wtpdf.cs) | +| Create PDF/A-4 document | [C#](https://github.com/itext/itext-publications-samples-dotnet/blob/master/itext/itext.samples/itext/samples/sandbox/pdfa/PdfA4.cs) | +| Create WTPDF document | [C#](https://github.com/itext/itext-publications-samples-dotnet/blob/master/itext/itext.samples/itext/samples/sandbox/pdfua/Wtpdf.cs) | +| Create ZUGFeRD/Factur-X document | [C#](https://github.com/itext/itext-publications-samples-dotnet/blob/master/itext/itext.samples/itext/samples/sandbox/zugferd/BasicSample.cs), [PDF](https://github.com/itext/itext-publications-samples-dotnet/blob/master/itext/itext.samples/cmpfiles/sandbox/zugferd/cmp_invoice_with_zugferd.pdf)| |
| | | **FIPS** | | | Enable FIPS | [C#](https://kb.itextpdf.com/home/it7kb/releases/release-itext-core-8-0-0/breaking-changes-for-itext-core-8-0-0/bouncy-castle-changes) | diff --git a/itext.tests/itext.layout.tests/itext/layout/element/FlexContainerSplitTest.cs b/itext.tests/itext.layout.tests/itext/layout/element/FlexContainerSplitTest.cs index 05a6ca5fb0..13041305e6 100644 --- a/itext.tests/itext.layout.tests/itext/layout/element/FlexContainerSplitTest.cs +++ b/itext.tests/itext.layout.tests/itext/layout/element/FlexContainerSplitTest.cs @@ -332,6 +332,30 @@ public virtual void TableInFlexOnSplitTest() { , "diff")); } + [NUnit.Framework.Test] + public virtual void TableInFlexOnSplit2Test() { + String outFileName = DESTINATION_FOLDER + "tableInFlexOnSplit2Test.pdf"; + String cmpFileName = SOURCE_FOLDER + "tableInFlexOnSplitTest2.pdf"; + using (PdfDocument pdfDocument = new PdfDocument(new PdfWriter(outFileName))) { + Document document = new Document(pdfDocument); + pdfDocument.SetDefaultPageSize(PageSize.A5); + Div flexContainer = new FlexContainer(); + flexContainer.SetBackgroundColor(ColorConstants.LIGHT_GRAY); + Table table = new Table(UnitValue.CreatePercentArray(new float[] { 10, 10, 10 })); + for (int i = 1; i <= 3; i++) { + table.AddHeaderCell("Header" + i); + } + for (int i = 1; i <= 81; i++) { + table.AddCell("Cell" + i); + } + flexContainer.Add(table); + Paragraph p = new Paragraph("Some text").SetBorder(new SolidBorder(1)).SetMargin(0); + document.Add(new FlexContainer().Add(flexContainer).Add(table)); + } + NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, DESTINATION_FOLDER + , "diff")); + } + private Div CreateDefaultFlexContainer() { Div flexContainer = new FlexContainer(); flexContainer.SetBorder(new SolidBorder(2)); diff --git a/itext.tests/itext.layout.tests/resources/itext/layout/FlexContainerSplitTest/tableInFlexOnSplitTest2.pdf b/itext.tests/itext.layout.tests/resources/itext/layout/FlexContainerSplitTest/tableInFlexOnSplitTest2.pdf new file mode 100644 index 0000000000..a6aa13cb26 Binary files /dev/null and b/itext.tests/itext.layout.tests/resources/itext/layout/FlexContainerSplitTest/tableInFlexOnSplitTest2.pdf differ diff --git a/itext/itext.layout/itext/layout/renderer/FlexContainerRenderer.cs b/itext/itext.layout/itext/layout/renderer/FlexContainerRenderer.cs index 4bba68eb68..ee298243fe 100644 --- a/itext/itext.layout/itext/layout/renderer/FlexContainerRenderer.cs +++ b/itext/itext.layout/itext/layout/renderer/FlexContainerRenderer.cs @@ -513,8 +513,8 @@ private void FillSplitOverflowRenderersForPartialResult(AbstractRenderer splitRe overflowRenderer.AddChildRenderer(childResult.GetOverflowRenderer()); } // Count the height allowed for the items after the one which was partially layouted - maxHeightInLine = Math.Max(maxHeightInLine, itemInfo.GetRectangle().GetY() + itemInfo.GetRenderer().GetOccupiedAreaBBox - ().GetHeight()); + maxHeightInLine = Math.Max(maxHeightInLine, itemInfo.GetRectangle().GetY() + childResult.GetOccupiedArea() + .GetBBox().GetHeight()); } else { if (metChildRendererInLine) { diff --git a/port-hash b/port-hash index 6ef01d1ffb..f2c325ab1a 100644 --- a/port-hash +++ b/port-hash @@ -1 +1 @@ -5309178a5193a7909c6a53f405e526a80b29540b \ No newline at end of file +1ad4f3a48de8884b72541d6afbfc5af196327728 \ No newline at end of file