Aspose.Words

Spacing Factor

Sometimes you may notice that page contents in the exported documents do not fit a particular page and therefore are pushed to the next page, causing an excessive page to appear. This is a trade-off of the flow layout mode which allows to compose documents from “normal” inline paragraphs and tables and which is default in Aspose.Words for JasperReports.

To overcome this issue, you can try to reduce spacing between page elements proportionally. This is controlled by the SPACING_FACTOR parameter. By default, its value is 1.0 that means the spacing between report elements is exactly equal to the designed values. However, you can set any value between 0.0 and 1.0 to reduce the spacing and therefore make the whole page contents shorter. Keep reducing the parameter’s value until the report looks like expected.

JasperReports:

[Java]

 

   import com.aspose.words.jasperreports.*;

 

   AWDocExporter exporter = new AWDocExporter();

   exporter.setParameter(AWExporterParameter.SPACING_FACTOR, 0.75);

   exporter.exportReport();

 

 

JasperServer:

[XML]

 

<bean id="aw_exportParameters" class="com.aspose.words.jasperreports.AWExportParametersBean">

    <property name="spacingFactor" value="0.75"/>

</bean>