Skip to content

MigraDoc: table with rows having a KeepWith value exceeding the row count #250

@WeidauerS

Description

@WeidauerS

We are creating a table with a dynamic count of rows. For some rows we are using the KeepWith property to keep rows together on a page break. Therefore it's possible that any of the (last) rows may be having a value for KeepWith exceeding the row count of the table. In such cases a System.ArgumentOutOfRangeException is thrown when rendering the document:

..
at MigraDoc.DocumentObjectModel.Tables.Rows.get_Item(Int32 index)
at MigraDoc.Rendering.TableRenderer.CalcLastConnectedRowDirect(Int32 row)
at MigraDoc.Rendering.TableRenderer.CreateConnectedRows()
..

At the moment we have a workaround for this, but it would be helpful if a value for KeepWith that exceeds the table row count would be simply reduced to the maximum allowed value on rendering.

Thanks!

Issue.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestforumPlease use Discussions or the Support forum to ask Support questions - https://forum.pdfsharp.net/support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions