Unplanned
Last Updated: 28 Jun 2023 09:49 by Fubin
Fubin
Created on: 28 Jun 2023 09:49
Category: WordsProcessing
Type: Bug Report
1
WordsProcessing: Cloning an element with a list in it into another document causes KeyNotFoundException on export

When a document has a list in it and the element containing it is cloned into another document, there is a key not found exception if you try to export the second document.

            RadFlowDocument document = new RadFlowDocument();
            if (tableDocument.Sections.First().Blocks.First() is Table workSheetTable)
            {
                Table clonedTable = workSheetTable.Clone(document);
                var newSection = document.Sections.AddSection();
                newSection.Blocks.Add(clonedTable);
            }

            byte[] pdfBytes = pdfProvider.Export(document);
            byte[] docBytes = docxProvider.Export(document);

0 comments