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

Free Support Forum - aspose.com

Aspose.Words for JasperReports exports extra empty space


Have stumbled on some issues using aspose and ireport I was hoping I could get help with here.

Issue, longer subreports in Jasper causes aspose to add pagebreaks not wanted in word, i.e page break in middle of table, pushing text or even parts of said table to next page. This causes one page to be empty or only with a row or two from a subreports table and then the rest of the rows of the table or text on the next page.

Versions: Aspose.words 1.9.0, iReport 5.1.0

I know we have old versions but sadly we are unable to upgrade at the moment which have made us miss some nice fixes that have gotten into later versions of aspose. But I was wondering if anyone might know a way I can solve the issue with subreports that end near or just overflow a page causes aspose to add a page break so that whatever comes after the subreport is pushed down a page and gives me empty pages in word.

I think this is related to aspose because of it working well in iReport.
I think it is related to subreports because text in the same detail band as any of the subreports is also pushed down, not only things in following detail bands.

I am sadly not allowed to show code, and not sure I am allowed to show the jrxml so I am grasping a little after straws to see if anyone here is able to help me.

Have a great day!
Write you later / Mårten


We suggest you please use the latest version of Aspose.Words for JasperReports 19.12. You can get the 30 days temporary license from here:
Get a Temporary License

If you still face problem, please attach the following resources here for testing:

  • Your input .jrprint file.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Thanks but sadly we are unable to upgrade aspose version at the moment as we do not have the time needed to also go up in iReport version and retesting all reports we have.
It is something we hope to be able to do but might sadly take a long time before we get that time in the backlog.

But thanks anyway, I will keep on looking around and see if I can find a solution for now.

Have a great day!


Please note that we do not provide support for older released versions of Aspose.Words. Moreover, we do not provide any fixes or patches for old versions of Aspose products either. All fixes and new features are always added into new versions of our products.

We always encourage our customers to use the latest version of Aspose.Words as it contains newly introduced features, enhancements and fixes to the issues that were reported earlier.

All that makes perfect sense, I was grasping a bit after straws and I will see if I can get the company to upgrade version.

Thanks for taking your time to reply to me despite me having an outdated version.

Have a great day!

Found a solution to my problem and thought I might post it here in case anyone else have similar issues.

Tweaked a parameter into our exporter to get the tables to work properly, I adjusted the:
exporter.setParameter(AWExporterParameter.SPACING_FACTOR, 0.5d);

and for us a value of 0.5d seemed to work well. We had 0.7 before but going down to 0.5 seemed to help with all tables.

And now we are allowed to go up in version so we are at 19.12 and will be better at keeping the version up to date.


It is nice to hear from you that you have found the solution of your issue. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

I seem to have spoken to soon, changing SPACEING_FACTOR corrected some things but sadly not every instance.
I am attaching a zip file with following files:

  • EnkelRapportGeneratedXml.xml - This file is a generated xml for the data wanted for the report
  • JasperReportProcess.java - The class we use to generate documents and use Aspose
  • Word file broken.docx - The result when we use aspose, you can see that column A-1.3 is placed wrong and causes a page break after it which is not desired. It seems to overflow from page before as it doesn’t get the table header either.
  • Word file wokringdocx.docx - How we would want the word to look
  • folders with report and subreports we use to generate this word dokument.

iReport version 5.1.0, aspose 19.12

I hope you can help me with this, if you need anything else I will try to provide it.
Have a great day!

UnwantedPageBreakData.zip (165.0 KB)


Thanks for sharing the detail. It would be great if you please share the values of parameters you used for the main method. You may hard code the nine parameters in your code and share it with us. Thanks for your cooperation.

The parameters should be in the comments explaining the arguments going into the main, after the --.
Since some are relative to where the files are located I can’t give them as it depends on where you put the files :slight_smile:


To ensure a timely and accurate response, please hard code the nine parameters’ values. You can use path like “C:\temp”. Please check my response in your [other thread](https://forum.aspose.com/t/image-outside-of-left-margin/210010/8?u=tahir.manzoor). Thanks for your cooperation.

I am so sorry, I had gotten the parameters mixed up.
I hard coded and if you unzip this in c:/tmp/Aspose this should work now.
Again sorry.

Will make a new zip for the image outside of bounds for the other thread as well now.

Aspose.zip (178.6 KB)


We have logged this problem in our issue tracking system as WORDSJR-284 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.