Merging documents but keeping separate formatting/headers

2 posts, 0 answers
  1. Aaron
    Aaron avatar
    2 posts
    Member since:
    Oct 2012

    Posted 08 Jan 2014 Link to this post


    I am having a problem with merging documents together and was hoping there would be a solution to this. Currently We are combining RadDocuments together with the following code found on another thread.

    private RadDocument MergeDocuments(RadDocument[] documents)
        RadDocument mergedDocument = new RadDocument();
        foreach (RadDocument document in documents)
            foreach (Section section in document.Sections)
                Section copySection = section.CreateDeepCopy() as Section;
        return mergedDocument;

    This does combine the documents but it messes with the formatting of them. Documents seem to inherit the header/footer properties of the other document and will also change the spacing and FontFamily of the document. I thought that this had something to do with the default values for a new RadDocument but I can't seem to figure out how to preserve each individual documents formatting when combining them.

    I basically would like to append a document to another one and keep them looking the same as they used to just on another page (Their own headers/footers, spacing, font etc). If there is a way to do this I would appreciate any help on how to accomplish this.

  2. Yancho
    Yancho avatar
    72 posts

    Posted 09 Jan 2014 Link to this post

    Hi Aaron,

    Thank you for contacting us!

    The RadRichTextBox’s functionality to merge documents is one of its key features. A lot of our customers insisted on having such as yours desired scenario because it’s very practical to user’s point of view. That’s why we created a sample SDK project which demonstrates how multiple documents can be merged into one.

    Please take a look at this demo for a reference!

    If you have any further questions, do not hesitate to contact us. 

    Kind regards, Yancho
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top