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

Free Support Forum - aspose.com

How to create editable Word documents

Hello support team
I am evaluating Aspose.Words for Jasper Reports to create editable Word documents. While it is possible to edit the resulted Word document, there are some points which are not working correctly:

  • Page number: adding / removing text leads to incorrect page numbers because these are exported as text and not as fields. How can I avoid this? Can I define Word code fields (ex. {PAGE \* MERGEFORMAT}) in my jasper report that can be handled by the Aspose exporter?
  • Is there a way to define numbered / bulleted lists for Word?
  • Is there a way to add a TOC code field for Word?

Do I have to use Aspose Word for Java to transform the document generated by the Aspose exporter?
Many thanks in advance for your help,
Dan A.

Hi Dan,

Thanks for your inquiry. Aspose.Words for Java is a class library that enables your applications to perform a great range of document processing tasks. Aspose.Words supports DOC, DOCX, RTF, HTML, OpenDocument, PDF, XPS, EPUB and other formats. With Aspose.Words you can generate, modify, convert, render and print documents without utilizing Microsoft Word®. For more information, please go through the documentation below:
https://docs.aspose.com/words/java/product-overview/

Aspose.Words for JasperReports is the only known solution on the market that makes possible exporting reports from JasperReports and JasperServer to Microsoft Word document formats. All report features are converted with the highest degree of precision to Microsoft Word documents.

*d.albutiu:

Is there a way to define numbered / bulleted lists for Word?*

You can create bullets/number list by using the "
…" and "

" tags in your jrxml file. Inside the text fields, you can use html (see the text field example below). Change the markup property to “html”.

*

d.albutiu:

Page number: adding / removing text leads to incorrect page numbers because these are exported as text and not as fields. How can I avoid this? Can I define Word code fields (ex. {PAGE \* MERGEFORMAT}) in my jasper report that can be handled by the Aspose exporter?
Is there a way to add a TOC code field for Word?*

Aspose.Words for JasperReports provides a unique feature that allows inserting Microsoft Word fields to any point of a document. This feature can be used to insert page numbers that are dynamically updated as the document is edited, TOC (table of contents), and many other things. Please read the detail from here:
https://docs.aspose.com/words/jasperreports/inserting-fields/

Hi Tahir,
Thank you for the fast response. It works!

Is it possible to define the Word template file (.dot) to be used by the Aspose exporter?

Many thanks,
Dan

Hi Dan,

Thanks for your inquiry. Unfortunately, Aspose.Words for JasperReports does not support the requested feature at the moment. However, I have logged this feature request as WORDSJSP-145 in our issue tracking system. You will be notified via this forum thread once this feature is available. We apologize for your inconvenience.

You can achieve your requirements using Aspose.Words for .NET/Java. Please use the Document.AttachedTemplate property gets or sets the full path of the template attached to the document.