We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Generate documents from one template

generate documents a template


what i need to do is simple to explain but seams to be har to do

I have one word template dotx and a colection os documents docx.
I wish to merge all this documents in a new document that use my word template.

the code to exemplify

Document doc = new Document(wordtemplate);
foreach (var docpath in docColection)
{
doc.AppendDocument(new Document(docpath),ImportFormatMode.UseDestinationStyles);
}

when i try to do that my template lose the header and footer and the documents appended sont follow the rules of the template, like have two coluns like the template has.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Could you please attach your template and documents, which you should insert into the template? I will check the issue and provide you more information. Also please attach a document, which will demonstrate what the expected result is. It will help me to understand your requirements better.

Best regards.

the documents that you requested are atached


this is a big impedment in my company and would be a huge argument if that worked to buy aspose

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I think the following code should satisfy your needs.

Document doc = new Document(@"Test001\Template.dotx");

Document[] docColection = new Document[] { new Document(@"Test001\Pleno.docx"), new Document(@"Test001\Presidente.docx") };

foreach (Document document in docColection)

InsertDocument(doc.LastSection.Body.LastChild, document);

doc.Save(@"Test001\out.docx");

You can find InsertDocument method here:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/howto-insert-a-document-into-another-document.html

Please let me know in case of any issues.

Best regards.

no it don’t make the result i want it lost all the textbox of word and when i try to save it to pdf it makes a real mess i will send you the files

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. As I can see your word document looks fine. Please clarify what do you mean when say that textboxes are lost.

Regarding converting to PDF:

1. I managed to reproduce the problem with table width. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

2. Text overlaps an image at the top of the document. the problem occurs because at the moment Aspose.Words does not fully support text wrapping of shapes. You will be notified as soon as this feature is fully supported. As a workaround, you can try refactoring your document. for example you can make an image at the top to be inline and move it into the document header.

Best regards.

if you see at the header of the document it lost all the words that where there and it lost the words at the footer too,


in the pdf there still problems with tables and not only with the image

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I managed to reproduce the problem with textboxes in header/footer. We will let you know once this issue is resolved.

Best regards.

The issues you have found earlier (filed as 15359) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

We are happy to tell you that a very cool and important feature (filed as 7180) is included in the new version of Aspose.Words. Text wrapping around images and shapes when rendering Microsoft Word documents to PDF, XPS and printing is now supported. You can download the latest version from here.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(34)

The issues you have found earlier (filed as WORDSNET-3334) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.