List problems when merging multiple RadDocuments together

3 posts, 0 answers
  1. Tom
    Tom avatar
    13 posts
    Member since:
    Aug 2015

    Posted 27 Jun Link to this post

    Hello,

    I have a situation where I will have a collection of multiple RadDocuments that I would like to merge together into one document (and eventually create a PDF). I am able to accomplish this, but any lists that may be contained in those documents do not come out properly. Is there something I have to do other than using CreateDeepCopy to retain those liststyles? My code is doing something like this:

        Dim mergedDocument As Telerik.Windows.Documents.Model.RadDocument = New Telerik.Windows.Documents.Model.RadDocument()

                    For Each section As Section In document.Sections             

                        Dim copySection As Section = TryCast(section.CreateDeepCopy(), Section)
                        copySection.PageMargin = section.PageMargin
                        copySection.PageSize = section.PageSize
                        copySection.CopyPropertiesFrom(section)

                        mergedDocument.Sections.Add(copySection)
                    Next

                Return mergedDocument

  2. Boby
    Admin
    Boby avatar
    684 posts

    Posted 28 Jun Link to this post

    Hello Tom,

    Could you try to use RadDocumentMerger and its AppendDocument method? It additionally handles the merging of the styles in the source and target documents. If this doesn't help, could you send us the documents you are trying to merge (you can open a support ticket if you want to send them in private), and explain the difference between the expected and the actual result?

    Regards,
    Boby
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Tom
    Tom avatar
    13 posts
    Member since:
    Aug 2015

    Posted 28 Jun in reply to Boby Link to this post

    Thank you, RadDocumentMerger was the way to go here. It worked perfectly. The only thing I had to do was copy over some of the section page sizing properties from my original documents to the corresponding sections in the new merged document.
Back to Top