How to unite few files?

Good day,

We prepare a complex report in our application using Aspose.Word. It consist of Header, Main part and Footer. In the end we unite the files using the method below. The problem is: some symbols from the footer disappear, for example, Wingdings symbols. We do not use styles like Heading, etc. Only Normal+Wingdings style. Could you help us to solve this problem?

The method:

private void AddSections(Document source, Document target)
{
    foreach (Section section in source.Sections)
    {
        if (target.Sections.Count == 0) target.Sections.Add(section.Clone());
        else
        {
            target.Sections[target.Sections.Count - 1].AppendContent(section);
        }
    }
}

Hi,

Thank you for considering Aspose.

Could you please attach the documents to let us take a look?

The attached archive contains three source files and the result file (Jody Allison.doc).

Hi,

Thanks for the attachment. Unfortunately, the cause seems to lie in your code (I should tell it at once, sorry): when using Section.AppendContent, headers and footers are not copied at all.

Sorry, I was not clear in my first post. I did not mean Header and Footer in Word’s terms (Main menu - View - Header and Footer).

I meant our Header and Footer - independent Word documents. I need to unite them (and one file between them) in one result file.

Could you look at BamfordFooter*.doc? It contains scissors symbol. But result document has no such symbol (font changed from Wingdings to Courier).

I united the files using method descibed above.

Thanks for the explanation. In current Aspose.Word fonts can be lost when copying sections, but this is resolved in the forthcoming Aspose.Word 2.5.

Thank you, Dmitry.

Is there a work around that we can use waiting for the next version?

You could probably use images instead, but the next version will be released very soon.