How to unite few files?


#1

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);

}

}

}









#2

Hi,

Thank you for considering Aspose.

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


#3

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


#4

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.


#5

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.


#6

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.


#7

Thank you, Dmitry.

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


#8

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