I am evaluating aspose.word for the server side .doc creation.
My current aim to to acheive following:
In a large word document there are some tags like and I need to find out similar kind of texts in the word file and take them out and replace with the "some file name.doc" contents. The file to be inserted could be of different format like "Portrait" or "Landscape". So I need to maintain the formatting as well as orientation of origianl and inserted document.
Right now we are using client side merging using Word library by finding the mentioned text and then selecting from that location to end of file and cut/paste the content into some other document (temporary) with formatting. At the end of the chopped doc we append the file using some word OLE api and then at the end we merge the lower portion to maintain the orientaion and formatting. (We tried to insert in between but that does not maintain formatting and orientation in every case)
I was going through forum and tried to find some method so that I can split the existing document into 2 part and do above mentioned approach to save memory for very big files. There are some posts which talks about breaking the document at section level or using nodes but as in my case it could be any where in the middle and I want to break from that location.
Q1. Does Aspose has any method to break the fiile at anylocation in the file?
Q2. How I can acheive the mention task, if possible some blog/forum reference.
We are eagerly looking into server side options for mentioned document operations.
I was going through some samples and and tried the following:
Aspose.Word.Document objDocSource = new Document(@"c:\template\appendix.doc");
Aspose.Word.Document objDocTarget = new Document();
foreach (Aspose.Word.Section DocumentSection in objDocSource.Sections)
// append all sections to the resulting document
Aspose.Word.Section NewSection = (objDocTarget.ImportNode(DocumentSection, true) as Aspose.Word.Section);
Source file was with Ariel font but the target font has changed to newtimes roman.
Please let me know I am doing something wrong.
Thanks in Advance,